This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* imports unchanged */ | |
class Home extends React.Component { | |
render() { | |
/* ... */ | |
} | |
componentDidMount() { | |
if (this.props.youtubeLibraryLoaded) { | |
this.fetchCategoriesAndMostPopularVideos(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Waypoint from 'react-waypoint'; | |
import {Loader} from 'semantic-ui-react'; | |
import './InfiniteScroll.scss'; | |
export function InfiniteScroll(props) { | |
return ( | |
<React.Fragment> | |
{props.children} | |
<Waypoint onEnter={props.bottomReachedCallback}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*...*/ | |
import {getVideoDurationString} from '../../services/date/date-format'; | |
export class VideoPreview extends React.Component { | |
render() { | |
/* ... */ | |
const duration = video.contentDetails ? video.contentDetails.duration : null; | |
const videoDuration = getVideoDurationString(duration); | |
const viewAndTimeString = VideoPreview.getFormattedViewAndTime(video); | |
const horizontal = this.props.horizontal ? 'horizontal' : null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*...*/ | |
import {getShortNumberString} from '../../services/number/number-format'; | |
TimeAgo.locale(en); | |
const timeAgo = new TimeAgo('en-US'); | |
export class VideoPreview extends React.Component { | |
render() { | |
{/* unchanged */} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {CommentsHeader} from "./CommentsHeader/CommentsHeader"; | |
import {AddComment} from "./AddComment/AddComment"; | |
import {Comment} from "./Comment/Comment"; | |
export class Comments extends React.Component { | |
render() { | |
return ( | |
<div> | |
<CommentsHeader amountComments={this.props.amountComments}/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import './Watch.scss'; | |
import {RelatedVideos} from '../../components/RelatedVideos/RelatedVideos'; | |
import {Video} from '../../components/Video/Video'; | |
export class Watch extends React.Component { | |
render() { | |
return ( | |
<div className='watch-grid'> | |
<Video className='video' id='-7fuHEEmEjs' /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import HeaderNav from './containers/HeaderNav/HeaderNav'; | |
import {SideBar} from './containers/SideBar/SideBar'; | |
class App extends Component { | |
render() { | |
return ( | |
<React.Fragment> | |
<HeaderNav/> | |
<SideBar/> |