From 24d77cba9b73325f779b730950cadefb7f30efb9 Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Tue, 26 Sep 2023 13:45:32 +0300 Subject: [PATCH] Render sidebar buttons function --- src/pages/Dashboard/LeftSidebar.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/pages/Dashboard/LeftSidebar.tsx b/src/pages/Dashboard/LeftSidebar.tsx index 87b046f1..d5edaf2b 100644 --- a/src/pages/Dashboard/LeftSidebar.tsx +++ b/src/pages/Dashboard/LeftSidebar.tsx @@ -11,11 +11,25 @@ import { import { YStack } from 'tamagui' import IconButtonWithDot from './IconButtonWithDot' import { useDispatch, useSelector } from 'react-redux' +import { toggleButtonSelection } from '../../redux/Sidebars/slice' const LeftSidebar = () => { + const buttons = useSelector((state: any) => state.leftSidebar.buttons) - console.log(buttons) - return ( + + 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; + } + }; return (