mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-14 17:51:03 -05:00
6872cfc51f
addresses most comments except modal refactor, and error response from sumitting report. * restore gui as a dev dependency * better separation of view container/presentation * replace absolute heights for textareas with making all sub components `display: flex` * start to make presentation more modular added subcomponents to the view folder: * share-banner (moved from components) * remix-credit * remix-list * studio-list
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
const React = require('react');
|
|
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
|
const Avatar = require('../../components/avatar/avatar.jsx');
|
|
const projectShape = require('./projectshape.jsx').projectShape;
|
|
|
|
const RemixCredit = props => {
|
|
const projectInfo = props.projectInfo;
|
|
if (Object.keys(projectInfo).length === 0) return null;
|
|
return (
|
|
<FlexRow className="remix-credit">
|
|
<Avatar
|
|
className="remix"
|
|
src={`https://cdn2.scratch.mit.edu/get_image/user/${projectInfo.author.id}_48x48.png`}
|
|
/>
|
|
<div className="credit-text">
|
|
Thanks to <a
|
|
href={`/users/${projectInfo.author.username}`}
|
|
>
|
|
{projectInfo.author.username}
|
|
</a> for the original project <a
|
|
href={`/preview/${projectInfo.id}`}
|
|
>
|
|
{projectInfo.title}
|
|
</a>.
|
|
</div>
|
|
</FlexRow>
|
|
);
|
|
};
|
|
|
|
RemixCredit.propTypes = {
|
|
projectInfo: projectShape
|
|
};
|
|
|
|
module.exports = RemixCredit;
|