feat : update
CI / Verify (push) Successful in 1m14s
CI / Build immutable images and deploy (push) Successful in 4m51s

This commit is contained in:
2026-09-06 17:41:16 +07:00 Unverified
parent fcf6a2c187
commit 770c60c4a2
10 changed files with 91 additions and 17 deletions
+6 -3
View File
@@ -5,8 +5,8 @@ import { UsersIcon } from "lucide-react";
import { Badge } from "@/components/ui/badge";
import { useAdminPresence } from "@/hooks/use-presence";
export function EditorPresence({ guideId }: { guideId: string }) {
const presence = useAdminPresence(guideId);
export function EditorPresence({ guideId, section }: { guideId: string; section: string }) {
const presence = useAdminPresence(guideId, section);
const editors = presence?.editorsByGuide[guideId] ?? [];
return (
<div className="flex flex-wrap items-center gap-1" aria-live="polite">
@@ -15,7 +15,10 @@ export function EditorPresence({ guideId }: { guideId: string }) {
Editing {editors.length || (presence ? 0 : "")}
</Badge>
{editors.map((editor) => (
<Badge key={editor.userId} variant="outline">{editor.name}</Badge>
<Badge key={editor.userId} variant="outline">
{editor.name}
{editor.sections.length ? ` · ${editor.sections.join(", ")}` : ""}
</Badge>
))}
</div>
);