-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathapp.tsx
35 lines (33 loc) · 1.07 KB
/
app.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import React from 'react';
import { Provider } from 'react-redux';
import { Outlet, Route, Routes } from 'react-router-dom';
import { ReduxRouter } from '@lagunovsky/redux-react-router'
import { Layout } from './layout/layout';
import { LayoutFooter } from './layout/layout-footer';
import { LayoutHeader } from './layout/layout-header';
import { Home } from './routes/home';
import { NotFound } from './routes/not-found';
import { history, store } from './store';
export function App() {
return (
<Provider store={store}>
<ReduxRouter history={history} store={store}>
<Routes>
<Route
path="/"
element={
<Layout
renderHeader={() => <LayoutHeader />}
renderFooter={() => <LayoutFooter />}
renderContent={() => <Outlet />}
/>
}
>
<Route index element={<Home />} />
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
</ReduxRouter>
</Provider>
);
}