import { HeartPulse, SendToBack, Book } from "lucide-react" import { FaGithub } from "react-icons/fa" import { Link, useLocation } from "react-router-dom" import { useEffect } from "react" import ReactGA from "react-ga4"; import { Logo } from "./Logo" import pckg from "../../package.json" type MenuItemTypes = "item" | "title" | "icon" const item = [ "group", "flex", "items-center", "text-base", "text-primary", "py-4", "px-6", "h-12", "overflow-hidden", "text-ellipsis", "whitespace-nowrap", "bg-background", "md:justify-start", "justify-center", "cursor-pointer", ] const itemInactive = [ "bg-transparent", "transition", "duration-300", "ease-in-out", ] const itemActive = [ "cursor-default", ] const title = ["ml-4 font-inter font-medium text-primary"] const titleInactive = ["group-hover:text-accent"] const titleActive = ["text-accent", "cursor-default"] const icon = [ "w-6", "h-6", "md:w-4", "md:h-4", "text-primary", ] const iconInactive = ["group-hover:text-accent"] const iconActive = ["cursor-default"] const cName = (type: MenuItemTypes, menu: string, reqMenu: string) => { let classes: string[] = [] switch (type) { case "item": if (menu === reqMenu) { classes = [...item, ...itemActive] } else { classes = [...item, ...itemInactive] } break case "title": if (menu === reqMenu) { classes = [...title, ...titleActive] } else { classes = [...title, ...titleInactive] } break case "icon": if (menu === reqMenu) { classes = [...icon, ...iconActive] } else { classes = [...icon, ...iconInactive] } break } return classes.join(" ") } export const Sidebar = () => { const location = useLocation() const currentPath = location.pathname.replace("/", "") useEffect(() => { ReactGA.send({ hitType: "pageview", page: `/${currentPath}` }); }, [currentPath]) return (

GHOST Lite Git
v {pckg.version}
) }