mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-28 01:56:00 -05:00
make scratchWikiLink prop
This commit is contained in:
parent
a903e3e9b2
commit
a635cd932c
1 changed files with 11 additions and 3 deletions
|
@ -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 => (
|
|||
</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href={getScratchWikiLink(props.intl.locale)}>
|
||||
<a href={props.scratchWikiLink}>
|
||||
<FormattedMessage id="general.wiki" />
|
||||
</a>
|
||||
</dd>
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue