ajit guptanextjss.hashnode.devยทMay 9, 2024Unexpected Token Error: Handling 404 Response in NextJS Applicationconst page = async() => { const session = await getServerSession(authOptions) if(!session){ redirect("/") } const response = await checkPdf() return ( <div> <ChatComponent name={session.user.name} heading={response===true?true:false}/> </div> ...next jsAdd a thoughtful commentNo comments yetBe the first to start the conversation.