Are you using tailwind css in your project with nextjs??
If Yes, then please check the below things:
Check _app.js file, whether you have imported the ThemeProvider or not.
You have to add a Key value pair , the tailwindc.config.js, which is darkMode:"class" and also be sure that you have added path for all the pages inside the content filed of the tailwindcss like this
Next am trying to change the background image just like the way background color changes, in this case should be background image changing, please help me.