Skip to content

Commit 3c71f98

Browse files
committed
fix: Use help link from context settings
1 parent ee3cac1 commit 3c71f98

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/components/HelpLink/index.jsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import React from 'react'
2+
import { connect } from 'react-redux'
3+
24
import IconButton from 'cozy-ui/transpiled/react/IconButton'
35
import Icon from 'cozy-ui/transpiled/react/Icon'
46
import HelpOutlinedIcon from 'cozy-ui/transpiled/react/Icons/HelpOutlined'
57

6-
const HelpLink = () => {
8+
import { getHelpLink } from 'lib/reducers'
9+
10+
const HelpLink = ({ helpLink }) => {
711
return (
812
<IconButton
913
component="a"
10-
href="https://support.cozy.io/"
14+
href={helpLink}
1115
target="_blank"
1216
rel="noopener, noreferrer"
1317
className="u-p-half"
@@ -17,4 +21,8 @@ const HelpLink = () => {
1721
)
1822
}
1923

20-
export default HelpLink
24+
const mapStateToProps = state => ({
25+
helpLink: getHelpLink(state)
26+
})
27+
28+
export default connect(mapStateToProps)(HelpLink)

0 commit comments

Comments
 (0)