scratch-www/src/views/messages/message-rows/studio-activity.jsx

40 lines
1.3 KiB
React
Raw Normal View History

2018-01-30 09:54:45 -05:00
var classNames = require('classnames');
var FormattedMessage = require('react-intl').FormattedMessage;
var React = require('react');
2018-01-30 09:54:45 -05:00
var SocialMessage = require('../../../components/social-message/social-message.jsx');
2018-01-30 09:54:45 -05:00
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 + '/activity';
2018-01-19 14:06:26 -05:00
2018-01-30 09:54:45 -05:00
var classes = classNames(
'mod-studio-activity',
this.props.className
);
return (
<SocialMessage
className={classes}
datetime={this.props.datetimeCreated}
iconSrc="/svgs/messages/studio-activity.svg"
iconAlt="studio activity notification image"
>
<FormattedMessage
id='messages.studioActivityText'
values={{
studioLink: <a href={studioLink}>{this.props.studioTitle}</a>
}}
/>
</SocialMessage>
);
}
});
module.exports = StudioActivityMessage;