New Icon/Logo
This commit is contained in:
@@ -18,6 +18,13 @@ export const ThemeProvider: React.FC<{ children: React.ReactNode }> = ({ childre
|
||||
useEffect(() => {
|
||||
console.log('Theme changed to:', theme);
|
||||
localStorage.setItem('theme', theme);
|
||||
|
||||
// Update favicon
|
||||
const link = document.querySelector("link[rel~='icon']") as HTMLLinkElement;
|
||||
if (link) {
|
||||
link.href = theme === 'dark' ? '/favicon-dark.svg' : '/favicon-light.svg';
|
||||
}
|
||||
|
||||
if (theme === 'dark') {
|
||||
document.documentElement.classList.add('dark');
|
||||
console.log('Added dark class, classList:', document.documentElement.classList.toString());
|
||||
|
||||
Reference in New Issue
Block a user