2018-05-31 16:49:17 -04:00
|
|
|
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">
|
2018-08-28 17:01:36 -04:00
|
|
|
<div className="list-title">
|
2018-05-31 16:49:17 -04:00
|
|
|
Remixes
|
2018-08-28 17:01:36 -04:00
|
|
|
</div>
|
2018-05-31 16:49:17 -04:00
|
|
|
{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;
|