"use client";
import { FC } from "react";
import DashboardMenuIcon from "images/dashboard-menu.png";
import AboutMenuIcon from "images/about-menu.png";
import TrendsMenuIcon from "images/trends-menu.png";
import SearchCreateMenuIcon from "images/search-create-menu.png";
import FAQMenuIcon from "images/faq-menu.png";
import Image from "next/legacy/image";
import {
Box,
Grid,
Typography,
List,
ListItem,
ListItemIcon,
ListItemText,
Drawer,
} from "@mui/material";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useTranslate } from "react-polyglot";
import { useLeafcutterContext } from "@link-stack/leafcutter-ui/components/LeafcutterProvider";
import { Tooltip } from "@link-stack/leafcutter-ui";
// import { ArrowCircleRight as ArrowCircleRightIcon } from "@mui/icons-material";
const MenuItem = ({
name,
href,
selected,
icon,
iconSize,
}: // tooltipTitle,
// tooltipDescription,
{
name: string;
href: string;
selected: boolean;
icon: any;
iconSize: number;
// tooltipTitle: string;
// tooltipDescription: string;
}) => {
const {
colors: { leafcutterLightBlue, black },
} = useLeafcutterContext();
return (
{name}
}
/>
);
};
interface SidebarProps {
open: boolean;
}
export const Sidebar: FC = ({ open }) => {
const t = useTranslate();
const pathname = usePathname() ?? "";
const section = pathname?.split("/")[1];
const {
colors: { white }, // leafcutterElectricBlue, leafcutterLightBlue,
} = useLeafcutterContext();
// const [recentUpdates, setRecentUpdates] = useState([]);
/*
useEffect(() => {
const getRecentUpdates = async () => {
const result = await fetch(`/api/trends/recent`);
const json = await result.json();
setRecentUpdates(json);
};
getRecentUpdates();
}, []);
*/
return (
{/*
{t("recentUpdatesTitle")}
{recentUpdates.map((trend, index) => (
{trend.title}
{trend.description}{" "}
))}
*/}
);
};