mirror of
https://github.com/Sonarr/Sonarr
synced 2025-12-06 08:28:37 +01:00
36 lines
978 B
TypeScript
36 lines
978 B
TypeScript
import { ConnectedRouter, ConnectedRouterProps } from 'connected-react-router';
|
|
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import DocumentTitle from 'react-document-title';
|
|
import { Provider } from 'react-redux';
|
|
import { Store } from 'redux';
|
|
import PageConnector from 'Components/Page/PageConnector';
|
|
import ApplyTheme from './ApplyTheme';
|
|
import AppRoutes from './AppRoutes';
|
|
|
|
interface AppProps {
|
|
store: Store;
|
|
history: ConnectedRouterProps['history'];
|
|
}
|
|
|
|
function App({ store, history }: AppProps) {
|
|
return (
|
|
<DocumentTitle title={window.Sonarr.instanceName}>
|
|
<Provider store={store}>
|
|
<ConnectedRouter history={history}>
|
|
<ApplyTheme />
|
|
<PageConnector>
|
|
<AppRoutes app={App} />
|
|
</PageConnector>
|
|
</ConnectedRouter>
|
|
</Provider>
|
|
</DocumentTitle>
|
|
);
|
|
}
|
|
|
|
App.propTypes = {
|
|
store: PropTypes.object.isRequired,
|
|
history: PropTypes.object.isRequired,
|
|
};
|
|
|
|
export default App;
|