import { FC, useState, useRef } from "react"; import Link from "next/link"; // icons import { FileText, HelpCircle, MessagesSquare, MoveLeft } from "lucide-react"; // ui import { Transition } from "@headlessui/react"; import { DiscordIcon, GithubIcon } from "@plane/ui"; // hooks import { useAppTheme } from "@/hooks/store"; // assets import packageJson from "package.json"; const helpOptions = [ { name: "Documentation", href: "https://docs.plane.so/", Icon: FileText, }, { name: "Join our Discord", href: "https://discord.com/invite/A92xrEGCge", Icon: DiscordIcon, }, { name: "Report a bug", href: "https://github.com/makeplane/plane/issues/new/choose", Icon: GithubIcon, }, { name: "Chat with us", href: null, onClick: () => (window as any).$crisp.push(["do", "chat:show"]), Icon: MessagesSquare, }, ]; export const InstanceHelpSection: FC = () => { // states const [isNeedHelpOpen, setIsNeedHelpOpen] = useState(false); // store const { sidebarCollapsed, toggleSidebar } = useAppTheme(); // refs const helpOptionsRef = useRef(null); return (
{helpOptions.map(({ name, Icon, href, onClick }) => { if (href) return (
{name}
); else return ( ); })}
Version: v{packageJson.version}
); };