diff --git a/src/pages/Dashboard/IconButtonWithDot.tsx b/src/pages/Dashboard/IconButtonWithDot.tsx index 4ae18c47..e9857603 100644 --- a/src/pages/Dashboard/IconButtonWithDot.tsx +++ b/src/pages/Dashboard/IconButtonWithDot.tsx @@ -4,44 +4,52 @@ import { Stack } from 'tamagui' import { toggleButtonSelection } from '../../redux/Sidebars/slice' type IconButtonWithDotProps = { - iconEl: any - variant: 'ghost' | 'outline' - isDotOn: boolean - selected?: boolean - disabled?: boolean - id: string + iconEl: any + variant: 'ghost' | 'outline' + isDotOn: boolean + selected?: boolean + disabled?: boolean + id: string } const IconButtonWithDot = ({ - iconEl, - variant, - isDotOn, - selected, - disabled, - id + iconEl, + variant, + isDotOn, + selected, + disabled, + id, }: IconButtonWithDotProps) => { - const dispatch = useDispatch() - const onClickHandler = (id: string) => { if (!disabled) dispatch(toggleButtonSelection(id)) } + const dispatch = useDispatch() + const onClickHandler = (id: string) => { + if (!disabled) dispatch(toggleButtonSelection(id)) + } - return ( - - onClickHandler(id)} /> - {isDotOn && ( - - )} - - ) + return ( + + onClickHandler(id)} + /> + {isDotOn && ( + + )} + + ) } export default IconButtonWithDot diff --git a/src/pages/Dashboard/LeftSidebar.tsx b/src/pages/Dashboard/LeftSidebar.tsx index b3aaa9cd..0fa33229 100644 --- a/src/pages/Dashboard/LeftSidebar.tsx +++ b/src/pages/Dashboard/LeftSidebar.tsx @@ -17,18 +17,27 @@ const LeftSidebar = () => { const renderIcon = (id: string) => { switch (id) { - case 'dashboard': return ; - case 'speed': return ; - case 'chart': return ; - case 'heart': return ; - case 'codeBlock': return ; - case 'communities': return ; - case 'activityCenter': return ; - case 'settings': return ; - default: return null; + case 'dashboard': + return + case 'speed': + return + case 'chart': + return + case 'heart': + return + case 'codeBlock': + return + case 'communities': + return + case 'activityCenter': + return + case 'settings': + return + default: + return null } - - }; return ( + } + return ( { { /> ))} - ); + ) } export default LeftSidebar diff --git a/src/pages/Dashboard/RightSideBar/RightSidebar.tsx b/src/pages/Dashboard/RightSideBar/RightSidebar.tsx index af62e10a..50f9279e 100644 --- a/src/pages/Dashboard/RightSideBar/RightSidebar.tsx +++ b/src/pages/Dashboard/RightSideBar/RightSidebar.tsx @@ -48,8 +48,12 @@ const RightSidebar = () => { - Validators - {countOfValidators} + + Validators + + + {countOfValidators} + diff --git a/src/pages/Dashboard/RightSideBar/SearchInput.stories.tsx b/src/pages/Dashboard/RightSideBar/SearchInput.stories.tsx index 2703c7f4..f1f2c181 100644 --- a/src/pages/Dashboard/RightSideBar/SearchInput.stories.tsx +++ b/src/pages/Dashboard/RightSideBar/SearchInput.stories.tsx @@ -15,5 +15,5 @@ export default meta type Story = StoryObj export const Default: Story = { - args: {value: 'Search value', }, + args: { value: 'Search value' }, } diff --git a/src/pages/Dashboard/RightSideBar/SearchInput.tsx b/src/pages/Dashboard/RightSideBar/SearchInput.tsx index eecd2d27..d99a29c9 100644 --- a/src/pages/Dashboard/RightSideBar/SearchInput.tsx +++ b/src/pages/Dashboard/RightSideBar/SearchInput.tsx @@ -1,27 +1,26 @@ -import { Input } from "@status-im/components" -import { SearchIcon } from "@status-im/icons" +import { Input } from '@status-im/components' +import { SearchIcon } from '@status-im/icons' type InputSearchProps = { - value: string - setValue: (value: string) => void + value: string + setValue: (value: string) => void } const InputSearch = ({ value, setValue }: InputSearchProps) => { - - return ( - <> - } - onClear={() => setValue('')} - size={40} - // button={{ - // label: 'Confirm', - // onPress: () => alert('Confirmed!'), - // }} - /> - - ) + return ( + <> + } + onClear={() => setValue('')} + size={40} + // button={{ + // label: 'Confirm', + // onPress: () => alert('Confirmed!'), + // }} + /> + + ) } -export default InputSearch \ No newline at end of file +export default InputSearch diff --git a/src/pages/Dashboard/RightSideBar/ValidatorListItem.stories.tsx b/src/pages/Dashboard/RightSideBar/ValidatorListItem.stories.tsx index 0446b9c6..ffbbbb13 100644 --- a/src/pages/Dashboard/RightSideBar/ValidatorListItem.stories.tsx +++ b/src/pages/Dashboard/RightSideBar/ValidatorListItem.stories.tsx @@ -3,17 +3,23 @@ import type { Meta, StoryObj } from '@storybook/react' import ValidatorListItem from './ValidatorListItem' const meta = { - title: 'Dashboard/ValidatorListItem', - component: ValidatorListItem, - parameters: { - layout: 'centered', - }, - tags: ['autodocs'], + title: 'Dashboard/ValidatorListItem', + component: ValidatorListItem, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { - args: { avatarKey: '37880sfsef38fsb', name: 'Validator 1', selected: true, isAvatarChipIncluded: true, isVerified: true }, + args: { + avatarKey: '37880sfsef38fsb', + name: 'Validator 1', + selected: true, + isAvatarChipIncluded: true, + isVerified: true, + }, } diff --git a/src/pages/Dashboard/RightSideBar/ValidatorsList.stories.tsx b/src/pages/Dashboard/RightSideBar/ValidatorsList.stories.tsx index 4595448e..3aa796bf 100644 --- a/src/pages/Dashboard/RightSideBar/ValidatorsList.stories.tsx +++ b/src/pages/Dashboard/RightSideBar/ValidatorsList.stories.tsx @@ -3,17 +3,17 @@ import type { Meta, StoryObj } from '@storybook/react' import ValidatorsList from './ValidatorsList' const meta = { - title: 'Dashboard/ValidatorsList', - component: ValidatorsList, - parameters: { - layout: 'centered', - }, - tags: ['autodocs'], + title: 'Dashboard/ValidatorsList', + component: ValidatorsList, + parameters: { + layout: 'centered', + }, + tags: ['autodocs'], } satisfies Meta export default meta type Story = StoryObj export const Default: Story = { - args: {}, + args: {}, } diff --git a/src/pages/Dashboard/RightSideBar/ValidatorsList.tsx b/src/pages/Dashboard/RightSideBar/ValidatorsList.tsx index cbea423a..c94bc2f8 100644 --- a/src/pages/Dashboard/RightSideBar/ValidatorsList.tsx +++ b/src/pages/Dashboard/RightSideBar/ValidatorsList.tsx @@ -5,7 +5,6 @@ import { useState, useEffect } from 'react' import { useDispatch } from 'react-redux' import { setCountOfValidators } from '../../../redux/RightSidebar/slice' - const ValidatorsList = () => { const dispatch = useDispatch() diff --git a/src/redux/RightSidebar/slice.ts b/src/redux/RightSidebar/slice.ts index acc408fc..20ce706c 100644 --- a/src/redux/RightSidebar/slice.ts +++ b/src/redux/RightSidebar/slice.ts @@ -1,25 +1,23 @@ -import { createSlice, PayloadAction } from '@reduxjs/toolkit'; +import { createSlice, PayloadAction } from '@reduxjs/toolkit' type RightSidebarStateType = { - countOfValidators: number; -}; + countOfValidators: number +} const initialState: RightSidebarStateType = { - countOfValidators: 0, -}; + countOfValidators: 0, +} const rightSidebarSlice = createSlice({ - name: 'rightSidebar', - initialState, - reducers: { - setCountOfValidators: (state, action: PayloadAction) => { - state.countOfValidators = action.payload; - }, + name: 'rightSidebar', + initialState, + reducers: { + setCountOfValidators: (state, action: PayloadAction) => { + state.countOfValidators = action.payload }, -}); + }, +}) -export const { - setCountOfValidators, -} = rightSidebarSlice.actions; +export const { setCountOfValidators } = rightSidebarSlice.actions -export default rightSidebarSlice.reducer; +export default rightSidebarSlice.reducer diff --git a/src/redux/store.ts b/src/redux/store.ts index 2a9249f0..0c7e1903 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -15,7 +15,7 @@ const store = configureStore({ theme: themeReducer, keyGeneration: keyGenerationReducer, leftSidebar: leftSidebarReducer, - rightSidebar: rightSidebarReducer + rightSidebar: rightSidebarReducer, }, })