+
);
diff --git a/src/components/MovieRow/MovieSummary/MovieSummary.js b/src/components/MovieRow/MovieSummary/MovieSummary.js
index 7f0081b..56f33ec 100644
--- a/src/components/MovieRow/MovieSummary/MovieSummary.js
+++ b/src/components/MovieRow/MovieSummary/MovieSummary.js
@@ -1,18 +1,19 @@
import React from 'react';
-import Aux from '../../../hoc/Aux/Aux';
+import Aux from '../../../hoc/Aux/Aux';
+import MovieRow from '../MovieRow';
+
const movieSummary = (props) => (
- // // map object into an array of jsx elemenst
- // const movieDetails = Object.keys(props.movies)
- // .map(movieKey => {
- // return
{movieKey}: {props.movies[movieKey]}
- // });
+ // get movieid and make api call
+
+ // render data dynamically
+
{/*
*/}
- Movie Title
+ Movie Title: {props.movieInfo.title}
rating: 45% realease-date: 2018 runtime: 100m
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nemo, delectus! Veniam error perferendis pariatur atque facere? Repudiandae, quia mollitia sapiente
necessitatibus vitae error assumenda maiores perferendis quaerat excepturi voluptatum quidem?
diff --git a/src/components/UI/Backdrop/Backdrop.js b/src/components/UI/Backdrop/Backdrop.js
index ae08f71..8a9ab61 100644
--- a/src/components/UI/Backdrop/Backdrop.js
+++ b/src/components/UI/Backdrop/Backdrop.js
@@ -1,7 +1,6 @@
import React from 'react';
-
const backdrop = (props) => (
props.show ? {
@@ -22,12 +23,11 @@ makeAipCall = (searchItem) => {
axios.get(url)
.then(res => {
// extract the data from json object
- console.log(res);
+ // console.log(res);
const movies = res.data.results;
// console.log(movies);
// Holds our movieComponent.
let movieRows = [];
- let total = 0;
movies.forEach((movie) => {
// manually build our image url and set it on the movie object
if (movie.poster_path !== null) {
@@ -35,8 +35,8 @@ makeAipCall = (searchItem) => {
// pass in the movie object to our MovieRow component and keep it in a variable called
// movieComponent
const movieComponent =
// push our movieComponent to our movieRows array;
@@ -44,6 +44,7 @@ makeAipCall = (searchItem) => {
}
})
+
// update state
this.setState({ rows: movieRows });
}).catch(error => {
@@ -68,13 +69,48 @@ makeAipCall = (searchItem) => {
selectMovieHandler = () => {
this.setState({toggleModal: true});
-
+
+
+ // const url = `https://api.themoviedb.org/3/movie/${movieId}?api_key=224ce27b38a3805ecf6f6c36eb3ba9d0&language=en-US`;
+ // axios.get(url)
+ // .then(res => {
+
+ // console.log(res.data)
+ // }).catch(error => {
+ // console.log(error);
+ // });
}
closeModal = () => {
this.setState({ toggleModal: false });
}
+ // get movie details
+ // return object
+ getMovieDetailsHandler = (movieId) => {
+ const url = `https://api.themoviedb.org/3/movie/${503314}?api_key=224ce27b38a3805ecf6f6c36eb3ba9d0&language=en-US`;
+ axios.get(url)
+ .then(res => {
+
+ const movieData = res.data;
+ console.log(movieData);
+ this.setState({movieDetails: movieData});
+ }).catch(error => {
+
+ console.log(error);
+ });
+ }
+
+
+
+
+
+
+
+
+
+
+
render() {
return (
@@ -83,7 +119,7 @@ makeAipCall = (searchItem) => {
{this.state.toggleMovieList ? : {this.state.rows}
}
-
+
diff --git a/src/static/sass/components/_backdrop.scss b/src/static/sass/components/_backdrop.scss
index 0d19870..b5427b4 100644
--- a/src/static/sass/components/_backdrop.scss
+++ b/src/static/sass/components/_backdrop.scss
@@ -5,5 +5,5 @@
z-index: 100;
left: 0;
top: 0;
- background-color: rgba($color-background, .5);
+ background-color: rgba($color-background, .7);
}
\ No newline at end of file