You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
992 B
37 lines
992 B
import { AppContextProvider } from '@/context.ts'
|
|
import { initI18n } from '@/i18n.ts'
|
|
import { appAtom, appStore, changeLanguage } from '@/store/system.ts'
|
|
import { IAppData } from '@/global'
|
|
import { ConfigProvider } from '@/components/config-provider'
|
|
import { Provider, useAtom } from 'jotai'
|
|
import './App.css'
|
|
import { useEffect } from 'react'
|
|
import { RootProvider } from './routes.tsx'
|
|
|
|
|
|
function App() {
|
|
|
|
const [ appData, ] = useAtom(appAtom)
|
|
|
|
useEffect(() => {
|
|
initI18n()
|
|
}, [])
|
|
|
|
|
|
return (
|
|
<ConfigProvider>
|
|
<AppContextProvider value={{
|
|
get appData() {
|
|
return appData as IAppData
|
|
},
|
|
changeLanguage
|
|
}}>
|
|
<Provider store={appStore}>
|
|
<RootProvider context={{}}/>
|
|
</Provider>
|
|
</AppContextProvider>
|
|
</ConfigProvider>
|
|
)
|
|
}
|
|
|
|
export default App
|