fix: setting $effect wouldn't update
This commit is contained in:
1 parent
c75e0cc4b7
commit
c7e2963390
3 files changed
+8
-2
No files matched your search
@@ -44,7 +44,7 @@
|
|||||||
size = 'md',
|
size = 'md',
|
||||||
id = generateID(),
|
id = generateID(),
|
||||||
rows = 4,
|
rows = 4,
|
||||||
element = $bindable(undefined),
|
element = $bindable(),
|
||||||
class: clazz = '',
|
class: clazz = '',
|
||||||
customLabel,
|
customLabel,
|
||||||
suffix,
|
suffix,
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ if (typeof window != 'undefined') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$effect.root(() => {
|
$effect.root(() => {
|
||||||
|
$effect(() => {
|
||||||
if (typeof window != 'undefined') {
|
if (typeof window != 'undefined') {
|
||||||
localStorage.setItem('settings', JSON.stringify(settings))
|
localStorage.setItem('settings', JSON.stringify(settings))
|
||||||
}
|
}
|
||||||
@@ -220,4 +221,9 @@ $effect.root(() => {
|
|||||||
} else {
|
} else {
|
||||||
if (browser) locale.set(navigator?.language)
|
if (browser) locale.set(navigator?.language)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@@ -111,6 +111,6 @@ export const aliases = new Map([
|
|||||||
['he-IL', 'he'],
|
['he-IL', 'he'],
|
||||||
])
|
])
|
||||||
|
|
||||||
export const { t, locale, locales, loading, loadTranslations } = new i18n(
|
export let { t, locale, locales, loading, loadTranslations } = new i18n(
|
||||||
config
|
config
|
||||||
)
|
)
|
||||||
Reference in new issue
Block a user