2018-12-06 00:34:48 +02:00
|
|
|
import Grid from 'react-css-grid'
|
2018-12-05 00:49:33 +02:00
|
|
|
import React from 'react';
|
2018-12-07 18:59:16 +02:00
|
|
|
import PropTypes from 'prop-types';
|
2018-12-06 00:34:48 +02:00
|
|
|
import VideoItem from "./VideoItem";
|
2018-12-11 12:25:35 +02:00
|
|
|
import RandomItemTitle from "./SectionHeading";
|
2018-12-08 00:42:02 +02:00
|
|
|
import { Link } from 'react-router-dom';
|
2018-12-06 00:34:48 +02:00
|
|
|
|
|
|
|
class RandomTopic extends React.Component {
|
2018-12-06 20:33:29 +02:00
|
|
|
|
2018-12-06 00:34:48 +02:00
|
|
|
render() {
|
|
|
|
return (
|
2018-12-06 20:33:29 +02:00
|
|
|
<section>
|
2018-12-11 12:25:35 +02:00
|
|
|
<h2 className="section-heading">from the Archive Topics - من مواضيع الارشيف</h2>
|
|
|
|
|
|
|
|
<RandomItemTitle title={
|
|
|
|
this.props.topicName + ' (' +this.props.topicCount + ')'}/>
|
|
|
|
<Grid className="random-topics"
|
|
|
|
width={220}
|
2018-12-06 20:33:29 +02:00
|
|
|
gap={16}>
|
2018-12-07 19:35:40 +02:00
|
|
|
{this.props.videos.map(video =>
|
2018-12-08 20:32:45 +02:00
|
|
|
<VideoItem id={video.id} key={video.id} title={video.title }/>
|
2018-12-07 18:59:16 +02:00
|
|
|
)}
|
2018-12-11 12:42:56 +02:00
|
|
|
{/*<Link to="/topics">*/}
|
|
|
|
{/*<span className="view-all-parents">See All Topics</span>*/}
|
|
|
|
{/*</Link>*/}
|
|
|
|
{/*<Link to="/topics">*/}
|
|
|
|
{/*<span className="view-all-items"> See All videos of {this.props.topicName} ({this.props.topicCount})</span>*/}
|
|
|
|
{/*</Link>*/}
|
2018-12-06 20:33:29 +02:00
|
|
|
</Grid>
|
|
|
|
</section>
|
2018-12-06 00:34:48 +02:00
|
|
|
|
|
|
|
)
|
|
|
|
}
|
2018-12-05 00:49:33 +02:00
|
|
|
}
|
2018-12-06 00:34:48 +02:00
|
|
|
|
2018-12-07 18:59:16 +02:00
|
|
|
RandomTopic.propTypes = {
|
|
|
|
topicName: PropTypes.string,
|
|
|
|
videos: PropTypes.array,
|
2018-12-07 19:43:25 +02:00
|
|
|
loading: PropTypes.bool,
|
|
|
|
topicCount: PropTypes.number
|
2018-12-07 18:59:16 +02:00
|
|
|
};
|
|
|
|
|
2018-12-06 00:34:48 +02:00
|
|
|
export default (RandomTopic);
|