Constants
3 months ago
Router
3 months ago
Theme
4 months ago
components
3 months ago
context
1 year ago
images
3 months ago
reducers
1 year ago
screens
2 weeks ago
skeleton
4 months ago
utils
5 months ago
App.js
4 months ago
header-standalone.js
3 months ago
index.js
3 months ago
App.js
38 lines
| 1 | import { ChakraProvider, Container } from '@chakra-ui/react'; |
| 2 | import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; |
| 3 | import { HashRouter } from 'react-router-dom'; |
| 4 | import Router from './Router/Router'; |
| 5 | import Theme from './Theme/Theme'; |
| 6 | import { DashboardProvider } from './context/DashboardContext'; |
| 7 | import dashboardReducer, { initialState } from './reducers/DashboardReducer'; |
| 8 | |
| 9 | const App = () => { |
| 10 | const queryClient = new QueryClient({ |
| 11 | defaultOptions: { |
| 12 | queries: { |
| 13 | refetchOnWindowFocus: false, |
| 14 | refetchOnReconnect: false, |
| 15 | }, |
| 16 | }, |
| 17 | }); |
| 18 | |
| 19 | return ( |
| 20 | <DashboardProvider |
| 21 | initialState={initialState} |
| 22 | dashboardReducer={dashboardReducer} |
| 23 | > |
| 24 | <HashRouter> |
| 25 | <ChakraProvider theme={Theme}> |
| 26 | <QueryClientProvider client={queryClient}> |
| 27 | <Container maxW="100%" padding={0}> |
| 28 | <Router /> |
| 29 | </Container> |
| 30 | </QueryClientProvider> |
| 31 | </ChakraProvider> |
| 32 | </HashRouter> |
| 33 | </DashboardProvider> |
| 34 | ); |
| 35 | }; |
| 36 | |
| 37 | export default App; |
| 38 |