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, { PropTypes } from 'react'; | |
const Header = ({ user }) => ( | |
<nav className="navbar navbar-default"> | |
<div className="container-fluid"> | |
<div className="navbar-header"> | |
<a className="navbar-brand" href="/"> | |
Nitflex Movies | |
</a> | |
</div> |
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
[{ | |
"poster_path": "/9O7gLzmreU0nGkIB6K3BsJbzvNv.jpg", | |
"overview": "Framed in the 1940s for the double murder of his wife and her lover, upstanding banker Andy Dufresne begins a new life at the Shawshank prison, where he puts his accounting skills to work for an amoral warden. During his long stretch in prison, Dufresne comes to be admired by the other inmates -- including an older prisoner named Red -- for his integrity and unquenchable sense of hope.", | |
"release_date": "1994-09-10", | |
"id": 278, | |
"title": "The Shawshank Redemption", | |
"backdrop_path": "/xBKGJQsAIeweesB79KC89FpBrVr.jpg", | |
"popularity": 7.911657, | |
"vote_count": 5448, | |
"vote_average": 8.33, |
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 AppPresentation from './app-presentation'; | |
class AppContainer extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
user: null, | |
movies: 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 React from 'react'; | |
import './ajax-loading.css'; | |
const AjaxLoading = () => ( | |
<div> | |
<i className="glyphicon glyphicon-refresh spinning" /> | |
Loading... | |
</div> | |
); |
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
.glyphicon.spinning { | |
animation: spin 1s infinite linear; | |
} | |
@keyframes spin { | |
from { transform: scale(1) rotate(0deg); } | |
to { transform: scale(1) rotate(360deg); } | |
} |
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 AppPresentation from './app-presentation'; | |
class AppContainer extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
user: null, | |
movies: 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 React, { PropTypes } from 'react'; | |
const Billboard = ({ movie }) => ( | |
<div className="row"> | |
<div className="title"> | |
{movie.title} | |
</div> | |
<img | |
className="img-responsive" | |
alt={movie.title} |
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, { PropTypes } from 'react'; | |
import GenreRow from './genre-row'; | |
const GenreList = ({ movies, startPlaying }) => { | |
const allGenres = {}; | |
movies.forEach((movie) => { | |
movie.genre.forEach((genre) => { | |
if (allGenres[genre]) { | |
allGenres[genre].push(movie); |
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, PropTypes } from 'react'; | |
import GenreRowMovie from './genre-row-movie'; | |
import './genre-row.css'; | |
class GenreRow extends Component { | |
render() { | |
const { genre, movies, startPlaying } = this.props; | |
return ( | |
<div className="row genre-row"> |
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
.genre-row .genre-row-movie { | |
padding: 0; | |
} | |
.genre-row .genre-row-movie .title { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} |