mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-12 00:31:11 -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
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
const React = require('react');
|
|
const PropTypes = require('prop-types');
|
|
const FlexRow = require('../../components/flex-row/flex-row.jsx');
|
|
const ThumbnailColumn = require('../../components/thumbnailcolumn/thumbnailcolumn.jsx');
|
|
const projectShape = require('./projectshape.jsx').projectShape;
|
|
|
|
const RemixList = props => {
|
|
const remixes = props.remixes;
|
|
if (remixes.length === 0) return null;
|
|
return (
|
|
<FlexRow className="remix-list">
|
|
<div className="project-title">
|
|
Remixes
|
|
</div>
|
|
{remixes.length === 0 ? (
|
|
// TODO: style remix invitation
|
|
<span>Invite user to remix</span>
|
|
) : (
|
|
<ThumbnailColumn
|
|
cards
|
|
showAvatar
|
|
itemType="preview"
|
|
items={remixes.slice(0, 5)}
|
|
showFavorites={false}
|
|
showLoves={false}
|
|
showViews={false}
|
|
/>
|
|
)}
|
|
</FlexRow>
|
|
);
|
|
};
|
|
|
|
RemixList.propTypes = {
|
|
remixes: PropTypes.arrayOf(projectShape)
|
|
};
|
|
|
|
module.exports = RemixList;
|