"use client"; import { FC, useState, useRef } from "react"; import { Transition } from "@headlessui/react"; import Link from "next/link"; import { ExternalLink, FileText, HelpCircle, MoveLeft } from "lucide-react"; import { DiscordIcon, GithubIcon, Tooltip } from "@plane/ui"; // hooks import { useTheme } from "@/hooks"; // 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 = () => { // states const [isNeedHelpOpen, setIsNeedHelpOpen] = useState(false); // store const { isSidebarCollapsed, toggleSidebar } = useTheme(); // refs const helpOptionsRef = useRef(null); const redirectionLink = `${process.env.NEXT_PUBLIC_APP_URL ? `${process.env.NEXT_PUBLIC_APP_URL}/create-workspace` : `${process.env.NEXT_PUBLIC_DEPLOY_WITH_NGINX === "1" ? `/god-mode/` : `/`}`}`; return (
{!isSidebarCollapsed && "Redirect to plane"}
{helpOptions.map(({ name, Icon, href }) => { if (href) return (
{name}
); else return ( ); })}
Version: v{packageJson.version}
); };