mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-18 21:35:27 -04:00
35 lines
996 B
TypeScript
35 lines
996 B
TypeScript
import { QueryClientProvider } from '@tanstack/react-query';
|
|
import { ConnectedRouter, ConnectedRouterProps } from 'connected-react-router';
|
|
import React from 'react';
|
|
import DocumentTitle from 'react-document-title';
|
|
import { Provider } from 'react-redux';
|
|
import { Store } from 'redux';
|
|
import Page from 'Components/Page/Page';
|
|
import ApplyTheme from './ApplyTheme';
|
|
import AppRoutes from './AppRoutes';
|
|
import { queryClient } from './queryClient';
|
|
|
|
interface AppProps {
|
|
store: Store;
|
|
history: ConnectedRouterProps['history'];
|
|
}
|
|
|
|
function App({ store, history }: AppProps) {
|
|
return (
|
|
<DocumentTitle title={window.Sonarr.instanceName}>
|
|
<QueryClientProvider client={queryClient}>
|
|
<Provider store={store}>
|
|
<ConnectedRouter history={history}>
|
|
<ApplyTheme />
|
|
<Page>
|
|
<AppRoutes />
|
|
</Page>
|
|
</ConnectedRouter>
|
|
</Provider>
|
|
</QueryClientProvider>
|
|
</DocumentTitle>
|
|
);
|
|
}
|
|
|
|
export default App;
|