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.
 

35 lines
881 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 } from 'jotai'
import './App.css'
import { useEffect } from 'react'
import { RootProvider } from './routes.tsx'
function App() {
useEffect(() => {
initI18n()
}, [])
return (
<ConfigProvider>
<AppContextProvider value={{
appData: () => {
return appStore.get(appAtom) as IAppData
},
changeLanguage
}}>
<Provider store={appStore}>
<RootProvider context={{}}/>
</Provider>
</AppContextProvider>
</ConfigProvider>
)
}
export default App