fix(left-sidebar): replace 'any' types

This commit is contained in:
RadoslavDimchev 2024-04-10 17:00:21 +03:00 committed by Radoslav Dimchev
parent 2e6ab6f06a
commit 554d17a65a
2 changed files with 6 additions and 3 deletions

View File

@ -11,10 +11,13 @@ import {
import { XStack, YStack } from 'tamagui' import { XStack, YStack } from 'tamagui'
import { useSelector } from 'react-redux' import { useSelector } from 'react-redux'
import { Text, Tooltip } from '@status-im/components' import { Text, Tooltip } from '@status-im/components'
import LeftSidebarIconButton from './LeftSidebarIconButton' import LeftSidebarIconButton from './LeftSidebarIconButton'
import { SidebarButton } from '../../../redux/LeftSidebar/slice'
import { RootState } from '../../../redux/store'
const LeftSidebar = () => { const LeftSidebar = () => {
const buttons = useSelector((state: any) => state.leftSidebar.buttons) const buttons = useSelector((state: RootState) => state.leftSidebar.buttons)
const renderIcon = (path: string) => { const renderIcon = (path: string) => {
switch (path) { switch (path) {
@ -50,7 +53,7 @@ const LeftSidebar = () => {
border: '1px solid #F0F2F5', border: '1px solid #F0F2F5',
}} }}
> >
{buttons.map((button: any) => ( {buttons.map((button: SidebarButton) => (
<Tooltip <Tooltip
side="right" side="right"
content={ content={

View File

@ -1,6 +1,6 @@
import { createSlice } from '@reduxjs/toolkit' import { createSlice } from '@reduxjs/toolkit'
interface SidebarButton { export interface SidebarButton {
isDotOn: boolean isDotOn: boolean
isDisabled?: boolean isDisabled?: boolean
path: string path: string