Skip to content

Commit 8bb1aad

Browse files
committed
chore: hide sidebar in /requests
1 parent cd4a29f commit 8bb1aad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

frontend/src/components/Layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Outlet } from 'react-router-dom';
1+
import { Outlet, useLocation } from 'react-router-dom';
22
import Gutter from './Gutter';
33
import Sidebar from './Sidebar/Sidebar';
44
import type { DataSource } from '../types/datasource';
@@ -9,10 +9,13 @@ interface LayoutProps {
99
}
1010

1111
export default function Layout({ sources, isLoading }: LayoutProps) {
12+
const location = useLocation();
13+
const showSidebar = location.pathname.startsWith('/source/');
14+
1215
return (
1316
<div className="flex h-screen bg-background">
1417
<Gutter sources={sources} />
15-
<Sidebar sources={sources} isLoading={isLoading} />
18+
{showSidebar && <Sidebar sources={sources} isLoading={isLoading} />}
1619
<main className="flex-1 overflow-auto" aria-label="Main content">
1720
<Outlet />
1821
</main>

0 commit comments

Comments
 (0)