mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-08 01:23:33 +00:00
fix(left-sidebar): replace 'any' types
This commit is contained in:
parent
2e6ab6f06a
commit
554d17a65a
@ -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={
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user