From 9829456ed895f94c22469f7e0c7e9698e6edf678 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 10 Jun 2024 11:45:54 +0200 Subject: [PATCH] fixed sidenav margin in embedded mode --- src/Components/AppShell/SideBar.tsx | 13 ++++++++++++- .../Map/Subcomponents/Controls/SearchControl.tsx | 4 +--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Components/AppShell/SideBar.tsx b/src/Components/AppShell/SideBar.tsx index 5e1cd7a1..d4e70900 100644 --- a/src/Components/AppShell/SideBar.tsx +++ b/src/Components/AppShell/SideBar.tsx @@ -49,10 +49,21 @@ export function SideBar({ routes, bottomRoutes }: { routes: route[], bottomRoute } }, []) + const searchInput = useRef(null); + const [embedded, setEmbedded] = useState(true) + + + useEffect(() => { + let params = new URLSearchParams(location.search); + let embedded = params.get("embedded"); + embedded != "true" && setEmbedded(false) + + }, [location]); + return (