From 96d925a7b4de21bfe7bba3a6c22dce4b83364630 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Tue, 17 Oct 2023 20:31:47 +0300 Subject: [PATCH] fix: change sidebars folder to specific left sidebar --- src/pages/Dashboard/LeftSidebar/LeftSidebarIconButton.tsx | 2 +- src/redux/{Sidebars => LeftSidebar}/slice.ts | 4 +++- src/redux/store.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) rename src/redux/{Sidebars => LeftSidebar}/slice.ts (95%) diff --git a/src/pages/Dashboard/LeftSidebar/LeftSidebarIconButton.tsx b/src/pages/Dashboard/LeftSidebar/LeftSidebarIconButton.tsx index 8dd8df49..6ae19bf1 100644 --- a/src/pages/Dashboard/LeftSidebar/LeftSidebarIconButton.tsx +++ b/src/pages/Dashboard/LeftSidebar/LeftSidebarIconButton.tsx @@ -2,7 +2,7 @@ import { IconButton } from '@status-im/components' import { useDispatch } from 'react-redux' import { Stack } from 'tamagui' -import { toggleButtonSelection } from '../../../redux/Sidebars/slice' +import { toggleButtonSelection } from '../../../redux/LeftSidebar/slice' type IconButtonWithDotProps = { iconEl: any diff --git a/src/redux/Sidebars/slice.ts b/src/redux/LeftSidebar/slice.ts similarity index 95% rename from src/redux/Sidebars/slice.ts rename to src/redux/LeftSidebar/slice.ts index c3007c43..75ad1a65 100644 --- a/src/redux/Sidebars/slice.ts +++ b/src/redux/LeftSidebar/slice.ts @@ -35,7 +35,9 @@ const leftSidebarSlice = createSlice({ }, toggleDot: (state, action: PayloadAction) => { const button = state.buttons.find(button => button.id === action.payload) - if (button) button.isDotOn = !button.isDotOn + if (button) { + button.isDotOn = !button.isDotOn + } }, }, }) diff --git a/src/redux/store.ts b/src/redux/store.ts index f98afc32..7fe253f7 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -6,7 +6,7 @@ import pinnedMessageReducer from './PinnedMessage/slice' import execClientReducer from './ValidatorOnboarding/ClientSetup/slice' import keyGenerationReducer from './ValidatorOnboarding/KeyGeneration/slice' import depositReducer from './ValidatorOnboarding/Deposit/slice' -import leftSidebarReducer from './Sidebars/slice' +import leftSidebarReducer from './LeftSidebar/slice' import rightSidebarReducer from './RightSidebar/slice' import validatorOnboardingReducer from './ValidatorOnboarding/slice' import advisoriesReducer from './ValidatorOnboarding/Advisories/slice'