Attempt to fix note resizing with React keys and Muuri sync
This commit is contained in:
@@ -9,10 +9,10 @@ interface ThemeInitializerProps {
|
||||
|
||||
export function ThemeInitializer({ theme, fontSize }: ThemeInitializerProps) {
|
||||
useEffect(() => {
|
||||
console.log('[ThemeInitializer] Received theme:', theme)
|
||||
|
||||
// Helper to apply theme
|
||||
const applyTheme = (t?: string) => {
|
||||
console.log('[ThemeInitializer] Applying theme:', t)
|
||||
|
||||
if (!t) return
|
||||
|
||||
const root = document.documentElement
|
||||
@@ -66,7 +66,7 @@ export function ThemeInitializer({ theme, fontSize }: ThemeInitializerProps) {
|
||||
const localTheme = localStorage.getItem('theme-preference')
|
||||
const effectiveTheme = localTheme || theme
|
||||
|
||||
console.log('[ThemeInitializer] Local theme:', localTheme, '| Server theme:', theme, '| Using:', effectiveTheme)
|
||||
|
||||
|
||||
applyTheme(effectiveTheme)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user