From 8fbe1d69d97d0920dda875210a91b5c2735ac7d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 17 May 2024 08:49:46 +0100 Subject: [PATCH] chore: Setup link in sidebar --- .../src/pages/FlowEditor/components/EditorMenu.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/editor.planx.uk/src/pages/FlowEditor/components/EditorMenu.tsx b/editor.planx.uk/src/pages/FlowEditor/components/EditorMenu.tsx index 09c3dbb45f..e99fb24bd9 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/EditorMenu.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/EditorMenu.tsx @@ -1,4 +1,5 @@ import FactCheckIcon from "@mui/icons-material/FactCheck"; +import RateReviewIcon from "@mui/icons-material/RateReview"; import TuneIcon from "@mui/icons-material/Tune"; import Box from "@mui/material/Box"; import IconButton from "@mui/material/IconButton"; @@ -68,10 +69,10 @@ const MenuButton = styled(IconButton, { function EditorMenu() { const { navigate } = useNavigation(); - const { lastChunk } = useCurrentRoute(); + const { url } = useCurrentRoute(); const rootPath = rootFlowPath(); - const isActive = (route: string) => lastChunk.url.pathname.endsWith(route); + const isActive = (route: string) => url.pathname.endsWith(route); const handleClick = (route: string) => !isActive(route) && navigate(rootPath + route); @@ -91,6 +92,11 @@ function EditorMenu() { Icon: FactCheckIcon, route: "/submissions-log", }, + { + title: "Feedback", + Icon: RateReviewIcon, + route: "/feedback", + }, ]; return (