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

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. import { AppContextProvider } from '@/context.ts'
  2. import { initI18n } from '@/i18n.ts'
  3. import { appAtom, appStore, changeLanguage } from '@/store/system.ts'
  4. import { IAppData } from '@/global'
  5. import { ConfigProvider } from '@/components/config-provider'
  6. import { Provider } from 'jotai'
  7. import './App.css'
  8. import { useEffect } from 'react'
  9. import { RootProvider } from './routes.tsx'
  10. function App() {
  11. useEffect(() => {
  12. initI18n()
  13. }, [])
  14. return (
  15. <ConfigProvider>
  16. <AppContextProvider value={{
  17. appData: () => {
  18. return appStore.get(appAtom) as IAppData
  19. },
  20. changeLanguage
  21. }}>
  22. <Provider store={appStore}>
  23. <RootProvider context={{}}/>
  24. </Provider>
  25. </AppContextProvider>
  26. </ConfigProvider>
  27. )
  28. }
  29. export default App