import { FC, useState, useRef } from "react"; import Link from "next/link"; import { Transition } from "@headlessui/react"; import { FileText, HelpCircle, MessagesSquare, MoveLeft } from "lucide-react"; // hooks import { DiscordIcon, GithubIcon } from "@plane/ui"; import { useApplication } from "hooks/store"; // icons // 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 { theme: { sidebarCollapsed, toggleSidebar }, } = useApplication(); // refs const helpOptionsRef = useRef(null); return (
{helpOptions.map(({ name, Icon, href, onClick }) => { if (href) return (
{name}
); else return ( ); })}
Version: v{packageJson.version}
); };