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

39 lines
1.1 KiB
React
Raw Normal View History

2018-01-19 14:06:26 -05:00
const classNames = require('classnames');
const FormattedMessage = require('react-intl').FormattedMessage;
const PropTypes = require('prop-types');
const React = require('react');
2018-01-19 14:06:26 -05:00
const SocialMessage = require('../../../components/social-message/social-message.jsx');
2018-01-19 14:06:26 -05:00
const StudioActivityMessage = props => (
<SocialMessage
className={classNames(
'mod-studio-activity',
2018-01-19 14:06:26 -05:00
props.className
)}
datetime={props.datetimeCreated}
iconAlt="studio activity notification image"
iconSrc="/svgs/messages/studio-activity.svg"
>
<FormattedMessage
id="messages.studioActivityText"
values={{
studioLink: (
<a href={`/studios/${props.studioId}/activity`}>
{props.studioTitle}
</a>
)
}}
/>
</SocialMessage>
);
StudioActivityMessage.propTypes = {
className: PropTypes.string,
datetimeCreated: PropTypes.string.isRequired,
studioId: PropTypes.number.isRequired,
studioTitle: PropTypes.string.isRequired
};
module.exports = StudioActivityMessage;