From 189fd82915e8010fdb4026ae82858c717c56f040 Mon Sep 17 00:00:00 2001 From: Max Strasinsky Date: Wed, 22 May 2024 13:23:34 +0200 Subject: [PATCH] Navigate to actionable on "Voting" click --- frontend/src/lib/components/common/MenuItems.svelte | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/common/MenuItems.svelte b/frontend/src/lib/components/common/MenuItems.svelte index eb03b5be620..bf1fa878ab5 100644 --- a/frontend/src/lib/components/common/MenuItems.svelte +++ b/frontend/src/lib/components/common/MenuItems.svelte @@ -19,9 +19,14 @@ proposalsPathStore, } from "$lib/derived/paths.derived"; import { pageStore } from "$lib/derived/page.derived"; - import { isSelectedPath } from "$lib/utils/navigation.utils"; + import { + ACTIONABLE_PROPOSALS_URL, + isSelectedPath, + } from "$lib/utils/navigation.utils"; import MenuMetrics from "$lib/components/common/MenuMetrics.svelte"; import ActionableProposalTotalCountBadge from "$lib/components/proposals/ActionableProposalTotalCountBadge.svelte"; + import { ENABLE_ACTIONABLE_TAB } from "$lib/stores/feature-flags.store"; + import { authSignedInStore } from "$lib/derived/auth.derived"; let routes: { context: string; @@ -59,7 +64,11 @@ }, { context: "proposals", - href: $proposalsPathStore, + href: + // Switch to actionable proposals page only when signed in to preserve the universe. + $ENABLE_ACTIONABLE_TAB && $authSignedInStore + ? ACTIONABLE_PROPOSALS_URL + : $proposalsPathStore, selected: isSelectedPath({ currentPath: $pageStore.path, paths: [AppPath.Proposals, AppPath.Proposal],