feat(LeftSidebarState): Connect icons to correct pages

Co-authored-by: EmilIvanichkovv <emil.ivanichkov@gmail.com>
This commit is contained in:
Hristo Nedelkov 2024-03-07 13:14:44 +02:00 committed by Emil Ivanichkov
parent f8ca80f450
commit 17d5983490
1 changed files with 43 additions and 8 deletions

View File

@ -5,6 +5,7 @@ interface SidebarButton {
isDotOn: boolean isDotOn: boolean
isSelected: boolean isSelected: boolean
isDisabled?: boolean isDisabled?: boolean
path: string
} }
interface LeftSidebarState { interface LeftSidebarState {
@ -13,14 +14,48 @@ interface LeftSidebarState {
const initialState: LeftSidebarState = { const initialState: LeftSidebarState = {
buttons: [ buttons: [
{ id: 'dashboard', isDotOn: false, isSelected: true }, { id: 'dashboard', isDotOn: false, isSelected: true, path: '/dashboard' },
{ id: 'speed', isDotOn: false, isSelected: false }, {
{ id: 'chart', isDotOn: false, isSelected: false, isDisabled: true }, id: 'speed',
{ id: 'heart', isDotOn: false, isSelected: false }, isDotOn: false,
{ id: 'codeBlock', isDotOn: false, isSelected: false }, isSelected: false,
{ id: 'communities', isDotOn: false, isSelected: false }, path: '/validator-management',
{ id: 'activityCenter', isDotOn: true, isSelected: false }, },
{ id: 'settings', isDotOn: false, isSelected: false }, {
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: '/',
},
], ],
} }