fix warning
This commit is contained in:
parent
c912c12384
commit
c0cabdc45e
|
@ -21,7 +21,7 @@ const IconButtonWithDot = ({
|
||||||
id
|
id
|
||||||
}: IconButtonWithDotProps) => {
|
}: IconButtonWithDotProps) => {
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const onClickHandler = (id) => { if (!disabled) dispatch(toggleButtonSelection(id)) }
|
const onClickHandler = (id: string) => { if (!disabled) dispatch(toggleButtonSelection(id)) }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack style={{ position: 'relative', display: 'inline-block' }}>
|
<Stack style={{ position: 'relative', display: 'inline-block' }}>
|
||||||
|
|
|
@ -10,11 +10,9 @@ import {
|
||||||
} from '@status-im/icons'
|
} from '@status-im/icons'
|
||||||
import { YStack } from 'tamagui'
|
import { YStack } from 'tamagui'
|
||||||
import IconButtonWithDot from './IconButtonWithDot'
|
import IconButtonWithDot from './IconButtonWithDot'
|
||||||
import { useDispatch, useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
import { toggleButtonSelection } from '../../redux/Sidebars/slice'
|
|
||||||
|
|
||||||
const LeftSidebar = () => {
|
const LeftSidebar = () => {
|
||||||
|
|
||||||
const buttons = useSelector((state: any) => state.leftSidebar.buttons)
|
const buttons = useSelector((state: any) => state.leftSidebar.buttons)
|
||||||
|
|
||||||
const renderIcon = (id: string) => {
|
const renderIcon = (id: string) => {
|
||||||
|
@ -29,6 +27,7 @@ const LeftSidebar = () => {
|
||||||
case 'settings': return <SettingsIcon size={20} />;
|
case 'settings': return <SettingsIcon size={20} />;
|
||||||
default: return null;
|
default: return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}; return (
|
}; return (
|
||||||
<YStack
|
<YStack
|
||||||
space={'$4'}
|
space={'$4'}
|
||||||
|
|
|
@ -5,7 +5,6 @@ interface SidebarButton {
|
||||||
isDotOn: boolean
|
isDotOn: boolean
|
||||||
isSelected: boolean
|
isSelected: boolean
|
||||||
isDisabled?: boolean
|
isDisabled?: boolean
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LeftSidebarState {
|
interface LeftSidebarState {
|
||||||
|
|
Loading…
Reference in New Issue