import React, { useEffect, useRef, useState } from "react"; import { BookOpen, Briefcase, Cpu, GitHub, Menu, Plus, Tool, } from "react-feather"; import IndexCount from "./IndexCount"; import LLMStatus from "./LLMStatus"; import SystemSettingsModal, { useSystemSettingsModal, } from "../Modals/Settings"; import NewWorkspaceModal, { useNewWorkspaceModal, } from "../Modals/NewWorkspace"; import ActiveWorkspaces from "./ActiveWorkspaces"; import paths from "../../utils/paths"; import Discord from "../Icons/Discord"; export default function Sidebar() { const sidebarRef = useRef(null); const { showing: showingSystemSettingsModal, showModal: showSystemSettingsModal, hideModal: hideSystemSettingsModal, } = useSystemSettingsModal(); const { showing: showingNewWsModal, showModal: showNewWsModal, hideModal: hideNewWsModal, } = useNewWorkspaceModal(); return ( <>
{/* Header Information */}

AnythingLLM

{/* Primary Body */}

Managed cloud hosting

Enterprise Installation

{/* Footer */}
@MintplexLabs
{showingSystemSettingsModal && ( )} {showingNewWsModal && } ); } export function SidebarMobileHeader() { const [showSidebar, setShowSidebar] = useState(false); const [showBgOverlay, setShowBgOverlay] = useState(false); const sidebarRef = useRef(null); const { showing: showingSystemSettingsModal, showModal: showSystemSettingsModal, hideModal: hideSystemSettingsModal, } = useSystemSettingsModal(); const { showing: showingNewWsModal, showModal: showNewWsModal, hideModal: hideNewWsModal, } = useNewWorkspaceModal(); useEffect(() => { function handleBg() { if (showSidebar) { setTimeout(() => { setShowBgOverlay(true); }, 300); } else { setShowBgOverlay(false); } } handleBg(); }, [showSidebar]); return ( <>

AnythingLLM

setShowSidebar(false)} />
{/* Header Information */}

AnythingLLM

{/* Primary Body */}
{showingSystemSettingsModal && ( )} {showingNewWsModal && }
); }