import { Divider, IconButton, SwipeableDrawer, Tooltip, useMediaQuery, useTheme } from '@mui/material'; import { capitalize } from 'lodash'; import { useTranslation } from 'next-i18next'; import Avatar from '@/components/shared/Avatar'; import Footer from '@/components/shared/Footer'; import { right } from '@/config/sections'; import { setSidebarState } from '@/store/build/buildSlice'; import { useAppDispatch, useAppSelector } from '@/store/hooks'; import styles from './RightSidebar.module.scss'; const RightSidebar = () => { const theme = useTheme(); const { t } = useTranslation(); const dispatch = useAppDispatch(); const isDesktop = useMediaQuery(theme.breakpoints.up('lg')); const { open } = useAppSelector((state) => state.build.sidebar.right); const handleOpen = () => dispatch(setSidebarState({ sidebar: 'right', state: { open: true } })); const handleClose = () => dispatch(setSidebarState({ sidebar: 'right', state: { open: false } })); const handleClick = (id: string) => { const section = document.querySelector(`#${id}`); if (section) { section.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }; return (
{right.map(({ id, component }) => (
{component}
))}
); }; export default RightSidebar;