mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-01-09 22:12:28 -05:00
38 lines
1.2 KiB
React
38 lines
1.2 KiB
React
|
var classNames = require('classnames');
|
||
|
var FormattedMessage = require('react-intl').FormattedMessage;
|
||
|
var React = require('react');
|
||
|
|
||
|
var SocialMessage = require('../../../components/social-message/social-message.jsx');
|
||
|
|
||
|
var StudioActivityMessage = React.createClass({
|
||
|
type: 'StudioActivityMessage',
|
||
|
propTypes: {
|
||
|
studioId: React.PropTypes.number.isRequired,
|
||
|
studioTitle: React.PropTypes.string.isRequired,
|
||
|
datetimeCreated: React.PropTypes.string.isRequired
|
||
|
},
|
||
|
render: function () {
|
||
|
var studioLink = '/studios/' + this.props.studioId;
|
||
|
|
||
|
var classes = classNames(
|
||
|
'mod-studio-activity',
|
||
|
this.props.className
|
||
|
);
|
||
|
return (
|
||
|
<SocialMessage
|
||
|
className={classes}
|
||
|
datetime={this.props.datetimeCreated}
|
||
|
>
|
||
|
<FormattedMessage
|
||
|
id='messages.studioActivityText'
|
||
|
values={{
|
||
|
studioLink: <a href={studioLink}>{this.props.studioTitle}</a>
|
||
|
}}
|
||
|
/>
|
||
|
</SocialMessage>
|
||
|
);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
module.exports = StudioActivityMessage;
|