joschan21 / similarity-api

https://www.similarityapi.com/
630 stars 128 forks source link

Server/Client style mismatch #9

Open adrienclay36 opened 1 year ago

adrienclay36 commented 1 year ago

Hey there, really enjoyed the tutorial. I wanted to reach out to see if you had a solution for this. Due to the way we are using dark mode I am consistently getting this error in the console for this app, and can't seem to get rid of it:

Warning: Prop `className` did not match. Server: "bg-white text-slate-900 antialiased __className_0ec1f4 dark" Client: "bg-white text-slate-900 antialiased __className_0ec1f4"

It appears to be the way that maybe next themes (???) is appending 'dark' or 'light' on the server side, but it is not reflecting on the client.. Did you happen to encounter this or find a resolution for it? I have resolved this in another project using the original pages directory by migrating the styles to globals.css and using the @apply directive, but it cannot appear to work this way for the app directory because I think i'm understanding we are required to use the and tags in layout.tsx