From ee4791d9f7cd172039e7c552a01fd0a9270d1794 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Wed, 26 Feb 2025 01:05:10 +0100 Subject: [PATCH] refactor(ui): Add TODO comments for future URL-based state migration --- ui/src/routes/devices.$id.local-auth.tsx | 1 - ui/src/routes/devices.$id.mount.tsx | 3 +++ ui/src/routes/devices.$id.other-session.tsx | 1 + ui/src/routes/devices.$id.update.tsx | 4 +--- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/routes/devices.$id.local-auth.tsx b/ui/src/routes/devices.$id.local-auth.tsx index 4476aa2..31108cd 100644 --- a/ui/src/routes/devices.$id.local-auth.tsx +++ b/ui/src/routes/devices.$id.local-auth.tsx @@ -15,7 +15,6 @@ export default function LocalAuthRoute() { {/* TODO: Migrate to using URLs instead of the global state. To simplify the refactoring, we'll keep the global state for now. */} { if (!open) navigate(".."); }} diff --git a/ui/src/routes/devices.$id.mount.tsx b/ui/src/routes/devices.$id.mount.tsx index 46022a0..a239f11 100644 --- a/ui/src/routes/devices.$id.mount.tsx +++ b/ui/src/routes/devices.$id.mount.tsx @@ -39,6 +39,9 @@ import { useNavigate } from "react-router-dom"; export default function MountRoute() { const navigate = useNavigate(); + { + /* TODO: Migrate to using URLs instead of the global state. To simplify the refactoring, we'll keep the global state for now. */ + } return navigate("..")} />; } diff --git a/ui/src/routes/devices.$id.other-session.tsx b/ui/src/routes/devices.$id.other-session.tsx index e232a58..28bd3c1 100644 --- a/ui/src/routes/devices.$id.other-session.tsx +++ b/ui/src/routes/devices.$id.other-session.tsx @@ -7,6 +7,7 @@ import LogoWhite from "@/assets/logo-white.svg"; interface ContextType { connectWebRTC: () => Promise; } +/* TODO: Migrate to using URLs instead of the global state. To simplify the refactoring, we'll keep the global state for now. */ export default function OtherSessionRoute() { const outletContext = useOutletContext(); diff --git a/ui/src/routes/devices.$id.update.tsx b/ui/src/routes/devices.$id.update.tsx index 269b887..992768e 100644 --- a/ui/src/routes/devices.$id.update.tsx +++ b/ui/src/routes/devices.$id.update.tsx @@ -25,9 +25,7 @@ export default function UpdateRoute() { {/* TODO: Migrate to using URLs instead of the global state. To simplify the refactoring, we'll keep the global state for now. */} { - if (!open) { - navigate(".."); - } + if (!open) navigate(".."); }} onConfirmUpdate={onConfirmUpdate} />