mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-11 16:21:04 -05:00
3dd768f2f6
* start work on www page committing out of paranoia. including changing splash page endpoints * updates from feedback thanks @rschamp! This includes: 1. splitting out messages list into a separate component (for clarity) 2. some comment/formatting adjustments for the api calls 3. removal of an extraneous property in emoji-text * remove duplicate string declaration * use object.assign instead of defaults deep we don’t need deep defaults * fix react warnings
38 lines
1.3 KiB
JavaScript
38 lines
1.3 KiB
JavaScript
var classNames = require('classnames');
|
|
var FormattedMessage = require('react-intl').FormattedMessage;
|
|
var injectIntl = require('react-intl').injectIntl;
|
|
var React = require('react');
|
|
|
|
var SocialMessage = require('../../../components/social-message/social-message.jsx');
|
|
|
|
var UserJoinMessage = injectIntl(React.createClass({
|
|
type: 'UserJoinMessage',
|
|
propTypes: {
|
|
datetimeJoined: React.PropTypes.string.isRequired
|
|
},
|
|
render: function () {
|
|
var exploreText = this.props.intl.formatMessage({id: 'general.explore'});
|
|
var projectText = this.props.intl.formatMessage({id: 'messages.userJoinMakeProject'});
|
|
|
|
var classes = classNames(
|
|
'mod-user-join',
|
|
this.props.className
|
|
);
|
|
return (
|
|
<SocialMessage
|
|
className={classes}
|
|
datetime={this.props.datetimeJoined}
|
|
>
|
|
<FormattedMessage
|
|
id='messages.userJoinText'
|
|
values={{
|
|
exploreLink: <a href="/explore">{exploreText}</a>,
|
|
makeProjectLink: <a href="/projects/editor/?tip_bar=getStarted">{projectText}</a>
|
|
}}
|
|
/>
|
|
</SocialMessage>
|
|
);
|
|
}
|
|
}));
|
|
|
|
module.exports = UserJoinMessage;
|