Next.js Discord

Discord Forum

Stuck in SSR in Next.js and Image Importing

Unanswered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
Hi, I'm kinda new to Next.js and I'm making a website which I'm following next.js 12 version but I'm making it in Next.js 13 .
I'm facing two issues first one is : const Home --> 'Home' is declared but its value is never read.
Second one is I'm importing image from Tmbd Api that after each reload images changes. In the Banner section the image isn't working.
So, I need solution what to do in this case

6 Replies

const Home --> 'Home' is declared but its value is never read.
this is mostly an warning about unused variables. you declared this component but isn't using it anywhere in the code yet

I'm importing image from Tmbd Api that after each reload images changes. In the Banner section the image isn't working.
do you receive any errors? for security reasons by default you can't use next/images with other domains, you can whitelist specific domains by using the remotePatterns config in next.config.js: https://nextjs.org/docs/app/api-reference/components/image#remotepatterns
Const Home = (( ... Part is grey out not in use. And idk how to get in use to SSR
@Dwarf Crocodile Const Home = (( ... Part is grey out not in use. And idk how to get in use to SSR
you're not using the Home component anywhere in your code and you're returning null
@Dayo you're not using the Home component anywhere in your code and you're returning null
Dwarf CrocodileOP
I'm kinda new, and yes I saw this on pop up. Soo what's the fix or what should I write instead of Home ?
we can't really answer that for you, you wrote the code so you should know what you are going to do with the component. if you are not using it then maybe just delete it?