From d8343fdd4083f4e6e63a8f136b552fa3e1fabb6c Mon Sep 17 00:00:00 2001 From: Nikolaj Frey Date: Wed, 16 Aug 2023 10:31:20 +1000 Subject: [PATCH] feat: feature/mvp-sprint-1 Fixed navigation edit/editor/things mode change issue --- remix/app/components/Nav/Nav.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/remix/app/components/Nav/Nav.tsx b/remix/app/components/Nav/Nav.tsx index 16c8725..c11dcf2 100644 --- a/remix/app/components/Nav/Nav.tsx +++ b/remix/app/components/Nav/Nav.tsx @@ -49,6 +49,9 @@ export const Nav = (props) => { if (pathname.slice(0, 7) === "/things") { const newPathname = pathname.replace("/things", "/edit") navigate(newPathname) + } else if (pathname.slice(0, 7) === "/editor") { + const newPathname = pathname.replace("/editor", "/things") + navigate(newPathname) } else if (pathname.slice(0, 5) === "/edit") { const newPathname = pathname.replace("/edit", "/things") navigate(newPathname)