I am trying to clone the following next.js react app and run it on localhost:3000
https://github.com/elee-ittdublin/lab6-nextjs
when I open localhost:3000 I get the following error
Unhandled Rejection (ReferenceError): fetch is not defined Function._callee$ ./pages/index.js:22
20 | // see https://nextjs.org/learn/basics/fetching-data-for-pages >22 | Index.getInitialProps = async function() { 24 | const url = 'https://api.tvmaze.com/search/shows?q=batman';
I have tried to research what I am doing wrong but I still can not fix my problem. Can anyone see where I am going wrong?
Cheers
<Link as={`/p/${show.id}`} href={`/post?id=${show.id}`}>