Created
August 17, 2018 14:12
-
-
Save luandevpro/deaa9a518508d03e3cc2542e98e0ae2e to your computer and use it in GitHub Desktop.
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 { Layout } from '../layouts/Layout' | |
import { CallAPIInfo } from '../utils/api' | |
class Post extends Component{ | |
static async getInitialProps({query}){ | |
const { id } = query | |
const res = await CallAPIInfo(id ,'get',null) | |
return { movie: res.data } | |
} | |
render(){ | |
var { movie } = this.props | |
console.log(movie) | |
return ( | |
<Layout> | |
movies details | |
</Layout> | |
) | |
} | |
} | |
export default Post |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment