adrianhajdin/ecommerce

Inconsistent Theme Application Based on URL Path

Opened this issue · 0 comments

Hello,

I've encountered an inconsistency with the theme . When the URL is "localhost:3000/incorrect", the light theme is correctly applied. However, when the URL changes to "localhost:3000/incorrect/wrong", the application unexpectedly switches to a dark theme.

Upon inspecting the element, I noticed a media query on the body: @media (prefers-color-scheme: dark). This seems to be responsible for the switch to dark mode. However, I have attached some screenshots to illustrate the issue.

This behavior is not consistent with the expected behavior of the application, which should always apply the light theme regardless of the URL path.

My default browser theme is set to dark mode

Could you please help investigate this issue? Any assistance would be greatly appreciated.

Thank you!

Attachments: Screenshots illustrating the issue
error
error2
reason