Open MaximKirsch opened 5 months ago
Thanks @MaximKirsch - yes, good spot. Will address
@edeleastar a little help on the debugging side of it as I get lost in CSS / Svelte :) There wasn't any obvious debugging so I saw in stores.ts that it hardcodes the storeTheme variable to tutors, I made a small change: let initialTheme = "tutors"; // Default value export const setInitialTheme = (theme: string) => { initialTheme = theme; };
export const storeTheme = localStorageStore("storeTheme", initialTheme);
and I can see the right theme name propagating through. This might have been propogating anyway but I think you should consider such a change in case that hard coding causes issues in user generated apps. Might be totally unnecessary but you know this better than I do.
In icon-lib.ts you have a subscribe to the storeTheme and I can see the right variable name makes it this far. My guess is here you need to do a CSS swaparoo to load the correct theme on the value change. That's as far as my skills will take me, I reckon it's a quick fix though
Thanks @lgriffin - will try this today….
Themes don't work on the Homepage for some reason.
Steps to reproduce:
-Go to Homepage (tutors.dev) -Click Themes in the upper right corner -Change Theme (Not Dark and Lightmode)
-Nothing changes.-