diff --git a/src/components/Sidebar/Sidebar.tsx b/src/components/Sidebar/Sidebar.tsx index 4ae207a..23bda45 100644 --- a/src/components/Sidebar/Sidebar.tsx +++ b/src/components/Sidebar/Sidebar.tsx @@ -1,46 +1,51 @@ -import { Box, Button, Heading, VStack } from '@chakra-ui/react'; +import { Box, Button, Heading, VStack, Divider } from '@chakra-ui/react'; import React from 'react'; -import { Divider } from '@chakra-ui/react'; +import { useLocation, Link } from 'react-router-dom'; import i18next from 'i18next'; -import { Link } from 'react-router-dom'; -const Sidebar = () => ( - - - {i18next.t(`dry-wash.arm.master.sideBar.title`)} - +const Sidebar = () => { + const location = useLocation(); - - - - - - - - -); + const isActive = (keyword: string) => location.pathname.includes(keyword); + + return ( + + + {i18next.t(`dry-wash.arm.master.sideBar.title`)} + + + + + + + + + + + ); +}; export default Sidebar;