scratch-www/src/views/messages/message-rows/user-join.jsx
Matthew Taylor 3dd768f2f6 GH-1361: Implement Notifications Page (#1487)
* 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
2017-08-31 17:05:22 -04:00

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;