From a635cd932c4a5d5dbe842e92be0432b3532bd0cf Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Thu, 25 Jun 2020 14:09:32 -0400 Subject: [PATCH] make scratchWikiLink prop --- src/components/footer/www/footer.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx index 49e5f48a0..a195702a2 100644 --- a/src/components/footer/www/footer.jsx +++ b/src/components/footer/www/footer.jsx @@ -2,6 +2,8 @@ const FormattedMessage = require('react-intl').FormattedMessage; const injectIntl = require('react-intl').injectIntl; const intlShape = require('react-intl').intlShape; const MediaQuery = require('react-responsive').default; +const connect = require('react-redux').connect; +const PropTypes = require('prop-types'); const React = require('react'); const FooterBox = require('../container/footer.jsx'); @@ -109,7 +111,7 @@ const Footer = props => (
- +
@@ -214,7 +216,13 @@ const Footer = props => ( ); 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);