"use client"; import Link from "next/link"; import { RiHome6Fill, RiCompassLine, RiCompass3Fill, RiQuestionAnswerLine, RiAddFill, RiSettings4Fill, RiSettings4Line, } from "react-icons/ri"; import { HiOutlineLightningBolt } from "react-icons/hi"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip"; import ZapPicker from "@/components/Modals/ZapPicker"; import { useModal } from "@/app/_providers/modal/provider"; import { IconType } from "react-icons"; type NavigationLink = { type: "link"; href: string; }; type NavigationButton = { type: "button"; onClick: () => void; }; type NavigationElement = { name: string; label: string; icon: IconType; current: boolean; active: boolean; } & (NavigationLink | NavigationButton); export default function Sidebar() { const modal = useModal(); const navigation: NavigationElement[] = [ { href: "", name: "home", label: "Home", icon: RiHome6Fill, type: "link", current: true, active: true, }, { href: "", name: "explore", label: "Explore", icon: RiCompassLine, type: "link", current: false, active: false, }, { href: "", name: "messages", label: "Messages", icon: RiQuestionAnswerLine, type: "link", current: false, active: false, }, { onClick: () => modal?.show(), name: "zap", label: "Zap Flockstr", icon: HiOutlineLightningBolt, type: "button", current: false, active: true, }, ]; return ( {navigation.map((item) => { if (item.type === "link") { if (item.active) { return ( {item.label} ); } else { return ( {item.label} Coming Soon ); } } else { if (item.active) { return ( {item.label} ); } else { return ( {item.label} Coming Soon ); } } })} modal?.show()} size={"icon"} className="xl:hidden" > modal?.show()} size={"lg"} className="hidden xl:flex" > Add Note Settings ); }
Coming Soon