Skip to content

Commit 899701a

Browse files
authored
fix: enable voting tab for all networks [LW-11910] (#3246)
Signed-off-by: Dominik Guzei <dominik.guzei@gmail.com>
1 parent b977de0 commit 899701a

File tree

3 files changed

+20
-17
lines changed

3 files changed

+20
-17
lines changed

source/renderer/app/config/sidebarConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const CATEGORIES_BY_NAME = {
5858
VOTING: {
5959
name: 'VOTING',
6060
icon: votingIcon,
61-
route: ROUTES.VOTING.REGISTRATION,
61+
route: ROUTES.VOTING.GOVERNANCE,
6262
tooltipTextId: 'voting',
6363
},
6464
};

source/renderer/app/containers/voting/Voting.tsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,33 @@ class Voting extends Component<Props> {
3636
const { app } = this.props.stores;
3737
const { intl } = this.props;
3838
const navItems: Array<NavButtonProps> = [
39-
{
40-
id: ROUTES.VOTING.REGISTRATION,
41-
label: intl.formatMessage(messages.votingTabCatalyst),
42-
},
4339
{
4440
id: ROUTES.VOTING.GOVERNANCE,
4541
label: intl.formatMessage(messages.votingTabGovernance),
4642
},
43+
{
44+
id: ROUTES.VOTING.REGISTRATION,
45+
label: intl.formatMessage(messages.votingTabCatalyst),
46+
},
4747
];
4848
const activeItem = navItems.find((item) => app.currentRoute === item.id);
4949
return (
5050
<MainLayout>
5151
<div style={{ height: '50px' }}>
52-
<Navigation
53-
items={navItems}
54-
activeItem={activeItem.label}
55-
isActiveNavItem={(navItemId: string) => navItemId === activeItem.id}
56-
onNavItemClick={(navItemId: string) => {
57-
this.props.actions.router.goToRoute.trigger({
58-
route: navItemId,
59-
});
60-
}}
61-
/>
52+
{environment.isMainnet || environment.isDev ? (
53+
<Navigation
54+
items={navItems}
55+
activeItem={activeItem.label}
56+
isActiveNavItem={(navItemId: string) =>
57+
navItemId === activeItem.id
58+
}
59+
onNavItemClick={(navItemId: string) => {
60+
this.props.actions.router.goToRoute.trigger({
61+
route: navItemId,
62+
});
63+
}}
64+
/>
65+
) : null}
6266
</div>
6367
{this.props.children}
6468
</MainLayout>

source/renderer/app/stores/SidebarStore.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ export default class SidebarStore extends Store {
130130
[categories.STAKING_DELEGATION_COUNTDOWN.name]: false,
131131
[categories.STAKING.name]: true,
132132
[categories.SETTINGS.name]: true,
133-
[categories.VOTING.name]:
134-
isMainnet || isDev || environment.votingVisibleOverride,
133+
[categories.VOTING.name]: true,
135134
[categories.NETWORK_INFO.name]: isFlight,
136135
};
137136
const categoriesFilteredList: Array<SidebarCategoryInfo> = list.filter(

0 commit comments

Comments
 (0)