mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add useWebConfig hook
This commit is contained in:
parent
5f86d89ca6
commit
865df884fd
3 changed files with 70 additions and 7 deletions
|
@ -5,6 +5,7 @@ import React from 'react';
|
|||
import StableApp from './apps/stable/App';
|
||||
import { HistoryRouter } from './components/router/HistoryRouter';
|
||||
import { ApiProvider } from './hooks/useApi';
|
||||
import { WebConfigProvider } from './hooks/useWebConfig';
|
||||
|
||||
const ExperimentalApp = loadable(() => import('./apps/experimental/App'));
|
||||
|
||||
|
@ -13,13 +14,15 @@ const RootApp = ({ history }: { history: History }) => {
|
|||
|
||||
return (
|
||||
<ApiProvider>
|
||||
<HistoryRouter history={history}>
|
||||
{
|
||||
layoutMode === 'experimental' ?
|
||||
<ExperimentalApp /> :
|
||||
<StableApp />
|
||||
}
|
||||
</HistoryRouter>
|
||||
<WebConfigProvider>
|
||||
<HistoryRouter history={history}>
|
||||
{
|
||||
layoutMode === 'experimental' ?
|
||||
<ExperimentalApp /> :
|
||||
<StableApp />
|
||||
}
|
||||
</HistoryRouter>
|
||||
</WebConfigProvider>
|
||||
</ApiProvider>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue