Skip to content

Commit 8abf445

Browse files
authored
Merge pull request #3865 from IntersectMBO/3132-title-wrong-on-live-voting-page
(fix#3132): change titles from Governance Actions to Live Voting
2 parents 783551c + c57ad9f commit 8abf445

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

govtool/frontend/src/consts/navItems.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const NAV_ITEMS: Array<NavItem | NavMenuItem> = [
4545
},
4646
{
4747
dataTestId: "governance-actions",
48-
label: i18n.t("govActions.title"),
48+
label: i18n.t("govActions.categoryTitle"),
4949
childNavItems: [
5050
{
5151
dataTestId: "proposed-governance-actions-link",
@@ -56,7 +56,7 @@ export const NAV_ITEMS: Array<NavItem | NavMenuItem> = [
5656
{
5757
dataTestId: "governance-actions-link",
5858
navTo: PATHS.governanceActions,
59-
label: i18n.t("govActions.navTitle"),
59+
label: i18n.t("govActions.title"),
6060
newTabLink: null,
6161
},
6262
{
@@ -108,7 +108,7 @@ export const CONNECTED_NAV_ITEMS = [
108108
},
109109
{
110110
dataTestId: "governance-actions-link",
111-
label: i18n.t("govActions.title"),
111+
label: i18n.t("govActions.categoryTitle"),
112112
navTo: PATHS.dashboardGovernanceActions,
113113
activeIcon: ICONS.governanceActionsActiveIcon,
114114
icon: ICONS.governanceActionsIcon,
@@ -139,7 +139,7 @@ export const CONNECTED_NAV_ITEMS = [
139139
{
140140
dataTestId: "governance-actions-live-voting-link",
141141
label: i18n.t("govActions.liveVoting.title"),
142-
navTo: OUTCOMES_PATHS.governanceActionsLiveVoting,
142+
navTo: PATHS.dashboardGovernanceActions,
143143
activeIcon: ICONS.governanceActionsActiveIcon,
144144
icon: ICONS.governanceActionsIcon,
145145
newTabLink: null,

govtool/frontend/src/consts/paths.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,4 @@ export const USER_PATHS = {
4949
export const OUTCOMES_PATHS = {
5050
governanceActionsOutcomes: "/outcomes",
5151
governanceActionOutcomes: "/outcomes/governance_actions/:id",
52-
governanceActionsLiveVoting: "/connected/governance_actions",
5352
};

govtool/frontend/src/i18n/locales/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@
489489
"submittedDateWithEpoch": "Submitted: <0>{{date}}</0> <1>(Epoch {{epoch}})</1>",
490490
"supportingLinks": "Supporting links",
491491
"threshold": "Ratification Threshold",
492-
"title": "Governance Actions",
493-
"navTitle": "Live Voting",
492+
"categoryTitle": "Governance Actions",
493+
"title": "Live Voting",
494494
"toVote": "To vote",
495495
"viewDetails": "View Details",
496496
"viewDetailsAndVote": "View Details and Vote",

govtool/frontend/src/pages/Dashboard.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ export const Dashboard = () => {
5353

5454
return proposalDiscussionNavItem ?? "";
5555
}
56+
57+
if (path.startsWith(PATHS.dashboardGovernanceActions)) {
58+
return t("govActions.title");
59+
}
60+
5661
return findNavItem(CONNECTED_NAV_ITEMS, path) ?? "";
5762
};
5863

0 commit comments

Comments
 (0)