import { ChevronRightIcon } from "@radix-ui/react-icons"; import { Badge } from "@/components/ui/badge"; import { GlowingGreenDot } from "@/components/icons/GlowingGreenDot"; import { useSessionsContext } from "@/hooks/use-sessions-context"; import { SteelIcon } from "../icons/SessionIcon"; export const Header = () => { const { pathname } = window.location; const currentSessionId = pathname.includes("sessions") && pathname.split("/").pop() !== "sessions" ? pathname.split("/").pop() : null; const { useSession } = useSessionsContext(); const { data: session, isLoading } = useSession(currentSessionId!); return (
{currentSessionId ? ( <> Session ) : ( <> Session )}
{currentSessionId && ( <>
#{currentSessionId.split("-")[0]} {!isLoading && session?.status === "live" && ( Live )}
)}
); };