From f98408230ce89e7c6083bb8ceb8eda3d0e898bcf Mon Sep 17 00:00:00 2001 From: Daryl Lim Date: Fri, 22 Mar 2024 01:25:13 -0700 Subject: [PATCH] fix(ui): Workflow switcher correctly shows check --- .../src/components/nav/workflow-switcher.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/nav/workflow-switcher.tsx b/frontend/src/components/nav/workflow-switcher.tsx index 8f72f782b..ab6c83bf7 100644 --- a/frontend/src/components/nav/workflow-switcher.tsx +++ b/frontend/src/components/nav/workflow-switcher.tsx @@ -87,14 +87,14 @@ export default function WorkflowSwitcher({ {!workflows ? ( ) : ( - workflows.map((workflow) => ( + workflows.map((wf) => ( { // If we're on cases page, stay at /workflows/{workflowId}/cases const nextPath = pathname.endsWith("/cases") - ? `/workflows/${workflow.id}/cases` - : `/workflows/${workflow.id}` + ? `/workflows/${wf.id}/cases` + : `/workflows/${wf.id}` router.push(nextPath) setOpen(false) }} @@ -103,18 +103,16 @@ export default function WorkflowSwitcher({ {/* TODO: Replace with CircleIcon and green / grey / red (error) / yellow (warning) */} - {workflow.title} + {wf.title}