Skip to content

Instantly share code, notes, and snippets.

@luandevpro
Created August 17, 2018 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luandevpro/deaa9a518508d03e3cc2542e98e0ae2e to your computer and use it in GitHub Desktop.
Save luandevpro/deaa9a518508d03e3cc2542e98e0ae2e to your computer and use it in GitHub Desktop.
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