import { Text, Box, CloseButton, Flex, Icon, useColorModeValue, Stack, Select, } from '@chakra-ui/react' import { FiArrowRight, FiHome, FiTrendingUp } from 'react-icons/fi' import { useApp } from '../AppContext' import { Logo } from './Logo' import { ColorModeSwitcher } from './ColorModeSwitcher' import { Link } from 'react-router-dom'; import { useTranslation } from 'react-i18next' import { useLocalStorage } from '../hooks' import { Lang } from './Lang' import { supportedLangs } from '../i18' const NavItem = ({ icon, path, onClick, children, ...rest }) => { return ( {icon && ( )} {children} ) } const DocItem = ({ path, children, ...rest }) => { return ( {children} ) } const SocialItem = ({ icon, path, ...rest }) => { return ( ) } export const SideBar = ({ onClose, ...rest }) => { const app = useApp() const bg = useColorModeValue('white', 'gray.900') const { t, i18n } = useTranslation() // const colorBorderRight = useColorModeValue('gray.200', 'gray.700') const menuItems = [ { name: t('home'), icon: FiHome, path: '/home', enabled: true }, { name: t('farm'), icon: FiTrendingUp, path: '/farm', enabled: true }, ] const docItems = [ { name: t('announcement'), icon: '', path: '', enabled: true }, { name: t('faq'), icon: '', path: '', enabled: true }, { name: t('tutorial'), icon: '', path: '', enabled: true }, ] return ( {/* nav links */} { menuItems.map((item) => ( item.enabled && {item.name} )) } {/* document links */} { docItems.map((item) => ( item.enabled && {item.name} )) } {/* social icons */} { app.socials.map((item) => ( item.enabled && )) } ) }