Initial commit

This commit is contained in:
John Wang
2023-05-15 08:51:32 +08:00
commit db896255d6
744 changed files with 56028 additions and 0 deletions

18
web/context/i18n.ts Normal file
View File

@@ -0,0 +1,18 @@
import { createContext } from 'use-context-selector'
import type { Locale } from '@/i18n'
type II18NContext = {
locale: Locale
i18n: Record<string, any>,
setLocaleOnClient: (locale: Locale) => void
// setI8N: (i18n: Record<string, string>) => void,
}
const I18NContext = createContext<II18NContext>({
locale: 'en',
i18n: {},
setLocaleOnClient: (lang: Locale) => { }
// setI8N: () => {},
})
export default I18NContext