2022-10-28 01:09:59 -04:00
|
|
|
import { History } from '@remix-run/router';
|
2022-11-18 12:55:46 -05:00
|
|
|
import React from 'react';
|
2022-10-28 01:09:59 -04:00
|
|
|
|
|
|
|
import { HistoryRouter } from './components/HistoryRouter';
|
|
|
|
import ServerConnections from './components/ServerConnections';
|
2022-11-18 12:55:46 -05:00
|
|
|
import { ApiProvider } from './hooks/useApi';
|
2022-10-28 01:09:59 -04:00
|
|
|
import AppRoutes from './routes/index';
|
|
|
|
|
2022-10-28 12:53:31 -04:00
|
|
|
const App = ({ history, connections }: { history: History, connections: typeof ServerConnections }) => {
|
2022-10-28 01:09:59 -04:00
|
|
|
return (
|
2022-11-18 12:55:46 -05:00
|
|
|
<ApiProvider connections={connections}>
|
|
|
|
<HistoryRouter history={history}>
|
|
|
|
<AppRoutes />
|
|
|
|
</HistoryRouter>
|
|
|
|
</ApiProvider>
|
2022-10-28 01:09:59 -04:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default App;
|