From 17d5983490c7ebbc332306ebfb9c208e2a278aa0 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Thu, 7 Mar 2024 13:14:44 +0200 Subject: [PATCH] feat(LeftSidebarState): Connect icons to correct pages Co-authored-by: EmilIvanichkovv --- src/redux/LeftSidebar/slice.ts | 51 ++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/src/redux/LeftSidebar/slice.ts b/src/redux/LeftSidebar/slice.ts index 75ad1a65..f82070c7 100644 --- a/src/redux/LeftSidebar/slice.ts +++ b/src/redux/LeftSidebar/slice.ts @@ -5,6 +5,7 @@ interface SidebarButton { isDotOn: boolean isSelected: boolean isDisabled?: boolean + path: string } interface LeftSidebarState { @@ -13,14 +14,48 @@ interface LeftSidebarState { const initialState: LeftSidebarState = { buttons: [ - { id: 'dashboard', isDotOn: false, isSelected: true }, - { id: 'speed', isDotOn: false, isSelected: false }, - { id: 'chart', isDotOn: false, isSelected: false, isDisabled: true }, - { id: 'heart', isDotOn: false, isSelected: false }, - { id: 'codeBlock', isDotOn: false, isSelected: false }, - { id: 'communities', isDotOn: false, isSelected: false }, - { id: 'activityCenter', isDotOn: true, isSelected: false }, - { id: 'settings', isDotOn: false, isSelected: false }, + { id: 'dashboard', isDotOn: false, isSelected: true, path: '/dashboard' }, + { + id: 'speed', + isDotOn: false, + isSelected: false, + path: '/validator-management', + }, + { + id: 'chart', + isDotOn: false, + isSelected: false, + isDisabled: true, + path: '/', + }, + { + id: 'heart', + isDotOn: false, + isSelected: false, + path: '/device-health-check', + }, + { id: 'codeBlock', isDotOn: false, isSelected: false, path: '/logs' }, + { + id: 'communities', + isDotOn: false, + isSelected: false, + isDisabled: true, + path: '/', + }, + { + id: 'activityCenter', + isDotOn: true, + isSelected: false, + isDisabled: true, + path: '/', + }, + { + id: 'settings', + isDotOn: false, + isSelected: false, + isDisabled: true, + path: '/', + }, ], }