"use client"; import { FC, useState, useRef } from "react"; import { observer } from "mobx-react-lite"; import Link from "next/link"; import { ExternalLink, FileText, HelpCircle, MoveLeft } from "lucide-react"; import { Transition } from "@headlessui/react"; // ui import { DiscordIcon, GithubIcon, Tooltip } from "@plane/ui"; // helpers import { WEB_BASE_URL, cn } from "@/helpers/common.helper"; // hooks import { useTheme } 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, }, ]; export const HelpSection: FC = observer(() => { // states const [isNeedHelpOpen, setIsNeedHelpOpen] = useState(false); // store const { isSidebarCollapsed, toggleSidebar } = useTheme(); // refs const helpOptionsRef = useRef(null); const redirectionLink = encodeURI(WEB_BASE_URL + "/"); return (
{!isSidebarCollapsed && "Redirect to plane"}
{helpOptions.map(({ name, Icon, href }) => { if (href) return (
{name}
); else return ( ); })}
Version: v{packageJson.version}
); });