Post.getInitialProps = async function (context) {
const { id } = context.query
const res = await fetch(`http://api.tvmaze.com/shows/${id}`)
const show = await res.json() console.log(`Fetched show: ${show.name}`) return { show }
}
2023-08-18 17:29:46
Post.getInitialProps = async function (context) {
const { id } = context.query
const res = await fetch(`http://api.tvmaze.com/shows/${id}`)
const show = await res.json() console.log(`Fetched show: ${show.name}`) return { show }
}