set prettier rules
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
"singleQuote": true
|
"singleQuote": true,
|
||||||
|
"jsxSingleQuote": true,
|
||||||
|
"semi": false
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react'
|
||||||
|
|
||||||
import MainContent from './MainContent';
|
import MainContent from './MainContent'
|
||||||
import Modal from '../components/UI/Modal';
|
import Modal from '../components/UI/Modal'
|
||||||
import MovieDetails from '../components/Movie/MovieDetails';
|
import MovieDetails from '../components/Movie/MovieDetails'
|
||||||
|
|
||||||
class Home extends Component {
|
class Home extends Component {
|
||||||
state = {
|
state = {
|
||||||
@@ -10,22 +10,22 @@ class Home extends Component {
|
|||||||
toggleModal: false,
|
toggleModal: false,
|
||||||
/** Holds the movie information for a single movie. */
|
/** Holds the movie information for a single movie. */
|
||||||
movieOverview: {},
|
movieOverview: {},
|
||||||
};
|
}
|
||||||
|
|
||||||
/* Get the appropriate details for a specific movie that was clicked */
|
/* Get the appropriate details for a specific movie that was clicked */
|
||||||
selectMovieHandler = async (movie) => {
|
selectMovieHandler = async (movie) => {
|
||||||
this.setState({ toggleModal: true });
|
this.setState({ toggleModal: true })
|
||||||
await this.setState({ movieOverview: movie });
|
await this.setState({ movieOverview: movie })
|
||||||
};
|
}
|
||||||
|
|
||||||
closeModal = () => {
|
closeModal = () => {
|
||||||
this.setState({ toggleModal: false });
|
this.setState({ toggleModal: false })
|
||||||
};
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="main-content">
|
<div className='main-content'>
|
||||||
<MainContent selectMovieHandler={this.selectMovieHandler} />
|
<MainContent selectMovieHandler={this.selectMovieHandler} />
|
||||||
</div>
|
</div>
|
||||||
<Modal
|
<Modal
|
||||||
@@ -36,8 +36,8 @@ class Home extends Component {
|
|||||||
<MovieDetails movie={this.state.movieOverview} />
|
<MovieDetails movie={this.state.movieOverview} />
|
||||||
</Modal>
|
</Modal>
|
||||||
</>
|
</>
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Home;
|
export default Home
|
||||||
|
|||||||
Reference in New Issue
Block a user