Commit a635cd93 authored by Ben Wheeler's avatar Ben Wheeler

make scratchWikiLink prop

parent a903e3e9
...@@ -2,6 +2,8 @@ const FormattedMessage = require('react-intl').FormattedMessage; ...@@ -2,6 +2,8 @@ const FormattedMessage = require('react-intl').FormattedMessage;
const injectIntl = require('react-intl').injectIntl; const injectIntl = require('react-intl').injectIntl;
const intlShape = require('react-intl').intlShape; const intlShape = require('react-intl').intlShape;
const MediaQuery = require('react-responsive').default; const MediaQuery = require('react-responsive').default;
const connect = require('react-redux').connect;
const PropTypes = require('prop-types');
const React = require('react'); const React = require('react');
const FooterBox = require('../container/footer.jsx'); const FooterBox = require('../container/footer.jsx');
...@@ -109,7 +111,7 @@ const Footer = props => ( ...@@ -109,7 +111,7 @@ const Footer = props => (
</a> </a>
</dd> </dd>
<dd> <dd>
<a href={getScratchWikiLink(props.intl.locale)}> <a href={props.scratchWikiLink}>
<FormattedMessage id="general.wiki" /> <FormattedMessage id="general.wiki" />
</a> </a>
</dd> </dd>
...@@ -214,7 +216,13 @@ const Footer = props => ( ...@@ -214,7 +216,13 @@ const Footer = props => (
); );
Footer.propTypes = { Footer.propTypes = {
intl: intlShape.isRequired intl: intlShape.isRequired,
scratchWikiLink: PropTypes.string
}; };
module.exports = injectIntl(Footer); const mapStateToProps = (state, ownProps) => ({
scratchWikiLink: getScratchWikiLink(ownProps.intl.locale)
});
const ConnectedFooter = connect(mapStateToProps)(Footer);
module.exports = injectIntl(ConnectedFooter);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment