Resolve the language setting persistence issue

- Move i18n initialization to async function
- Sync i18n with settings store language
- Add Root component for i18n loading state
- Convert i18n.js to TypeScript
This commit is contained in:
yangdx
2025-03-12 14:36:34 +08:00
parent e118cf6d92
commit fb0f8e11fd
5 changed files with 87 additions and 35 deletions

View File

@@ -1,12 +1,5 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import "./i18n";
import { Root } from '@/components/Root'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>
)
createRoot(document.getElementById('root')!).render(<Root />)