Skip to content

Commit

Permalink
Navigate to actionable on "Voting" click
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrasinskis committed May 22, 2024
1 parent 3a52155 commit 189fd82
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions frontend/src/lib/components/common/MenuItems.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit 189fd82

Please sign in to comment.