mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
fixed embedded param forwarding
This commit is contained in:
parent
88cf7a0cd0
commit
cfbf536d59
@ -49,7 +49,6 @@ export function SideBar({ routes, bottomRoutes }: { routes: route[], bottomRoute
|
|||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const searchInput = useRef<HTMLInputElement>(null);
|
|
||||||
const [embedded, setEmbedded] = useState<boolean>(true)
|
const [embedded, setEmbedded] = useState<boolean>(true)
|
||||||
|
|
||||||
|
|
||||||
@ -57,9 +56,10 @@ export function SideBar({ routes, bottomRoutes }: { routes: route[], bottomRoute
|
|||||||
let params = new URLSearchParams(location.search);
|
let params = new URLSearchParams(location.search);
|
||||||
let embedded = params.get("embedded");
|
let embedded = params.get("embedded");
|
||||||
embedded != "true" && setEmbedded(false)
|
embedded != "true" && setEmbedded(false)
|
||||||
|
|
||||||
}, [location]);
|
}, [location]);
|
||||||
|
|
||||||
|
let params = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav
|
<nav
|
||||||
id="sidenav"
|
id="sidenav"
|
||||||
@ -84,7 +84,7 @@ export function SideBar({ routes, bottomRoutes }: { routes: route[], bottomRoute
|
|||||||
(<NavLink
|
(<NavLink
|
||||||
end
|
end
|
||||||
target={route.blank ? "_blank" : "_self"}
|
target={route.blank ? "_blank" : "_self"}
|
||||||
to={route.path}
|
to={`${route.path}${params && '?'+params}`}
|
||||||
className={({ isActive }) => `${isActive ? 'tw-font-semibold tw-bg-base-200 !tw-rounded-none' : 'tw-font-normal !tw-rounded-none'}`} onClick={() => {
|
className={({ isActive }) => `${isActive ? 'tw-font-semibold tw-bg-base-200 !tw-rounded-none' : 'tw-font-normal !tw-rounded-none'}`} onClick={() => {
|
||||||
if (screen.width < 640 && !slim) instance.toggle();
|
if (screen.width < 640 && !slim) instance.toggle();
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user