1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/apps/stable/AppLayout.tsx

25 lines
684 B
TypeScript
Raw Normal View History

import React from 'react';
2023-10-06 20:45:37 -07:00
import { Outlet, useLocation } from 'react-router-dom';
import AppBody from 'components/AppBody';
2023-10-06 20:45:37 -07:00
import { DASHBOARD_APP_PATHS } from 'apps/dashboard/routes/routes';
import Backdrop from 'components/Backdrop';
import AppHeader from 'components/AppHeader';
export default function AppLayout() {
2023-10-06 20:45:37 -07:00
const location = useLocation();
const isNewLayoutPath = Object.values(DASHBOARD_APP_PATHS)
.some(path => location.pathname.startsWith(`/${path}`));
return (
2023-10-06 20:45:37 -07:00
<>
<Backdrop />
<AppHeader isHidden={isNewLayoutPath} />
<AppBody>
<Outlet />
</AppBody>
</>
);
}