mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
fix(ui): Update device route navigation to root on modal close
This commit is contained in:
@@ -439,7 +439,7 @@ export default function KvmIdRoute() {
|
|||||||
const outlet = useOutlet();
|
const outlet = useOutlet();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const onModalClose = useCallback(() => {
|
const onModalClose = useCallback(() => {
|
||||||
if (location.pathname !== "/other-session") navigateTo("..");
|
if (location.pathname !== "/other-session") navigateTo("/");
|
||||||
}, [navigateTo, location.pathname]);
|
}, [navigateTo, location.pathname]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user