refactor: move components to sub dir

This commit is contained in:
鲁树人
2023-06-03 14:13:37 +01:00
parent b136bac9b6
commit 897830cd44
9 changed files with 34 additions and 34 deletions

View File

@@ -0,0 +1,23 @@
import { useEffect } from 'react';
import App from './App';
import { ChakraProvider } from '@chakra-ui/react';
import { Provider } from 'react-redux';
import { theme } from '~/theme';
import { persistSettings } from '~/features/settings/persistSettings';
import { setupStore } from '~/store';
// Private to this file only.
const store = setupStore();
export function AppRoot() {
useEffect(() => persistSettings(store), []);
return (
<ChakraProvider theme={theme}>
<Provider store={store}>
<App />
</Provider>
</ChakraProvider>
);
}