mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-01-08 13:32:07 -05:00
590f505a61
This reverts commit1b1b396e92
, reversing changes made toa144bab0e6
.
43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
const classNames = require('classnames');
|
|
const FormattedMessage = require('react-intl').FormattedMessage;
|
|
const PropTypes = require('prop-types');
|
|
const React = require('react');
|
|
|
|
const SocialMessage = require('../../../components/social-message/social-message.jsx');
|
|
|
|
const LoveProjectMessage = props => (
|
|
<SocialMessage
|
|
as="div"
|
|
className={classNames(
|
|
'mod-love-project',
|
|
props.className
|
|
)}
|
|
datetime={props.loveDateTime}
|
|
>
|
|
<FormattedMessage
|
|
id="messages.loveText"
|
|
values={{
|
|
profileLink: (
|
|
<a href={`/users/${props.actorUsername}`}>
|
|
{props.actorUsername}
|
|
</a>
|
|
),
|
|
projectLink: (
|
|
<a href={`/projects/${props.projectId}`}>
|
|
{props.projectTitle}
|
|
</a>
|
|
)
|
|
}}
|
|
/>
|
|
</SocialMessage>
|
|
);
|
|
|
|
LoveProjectMessage.propTypes = {
|
|
actorUsername: PropTypes.string.isRequired,
|
|
className: PropTypes.string,
|
|
loveDateTime: PropTypes.string.isRequired,
|
|
projectId: PropTypes.number.isRequired,
|
|
projectTitle: PropTypes.string.isRequired
|
|
};
|
|
|
|
module.exports = LoveProjectMessage;
|