"use client"; import { useTranslation } from "@/components/i18n/locale-provider"; import { UsersIcon } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { useAdminPresence } from "@/hooks/use-presence"; export function EditorPresence({ guideId, section }: { guideId: string; section: string }) { const { t } = useTranslation(); const presence = useAdminPresence(guideId, section); const editors = presence?.editorsByGuide[guideId] ?? []; return (
{t("Editing")}{" "}{editors.length || (presence ? 0 : "")} {editors.map((editor) => ( {editor.name} {editor.sections.length ? ` ยท ${editor.sections.join(", ")}` : ""} ))}
); }