Added lang store
This commit is contained in:
8
src/i18n/store.ts
Normal file
8
src/i18n/store.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { type Language } from './ui';
|
||||
import { persistentAtom } from '@nanostores/persistent';
|
||||
|
||||
export const currentLang = persistentAtom<Language>('lang', "fr");
|
||||
|
||||
export function setLang(lang: Language) {
|
||||
currentLang.set(lang);
|
||||
}
|
||||
Reference in New Issue
Block a user