Files
workshop-manager/src/hooks/useWeeklyCheckInLive.ts
Julien Froidefond 53ee344ae7
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 6m24s
feat: add Weekly Check-in feature with models, UI components, and session management for enhanced team collaboration
2026-01-14 10:23:58 +01:00

32 lines
679 B
TypeScript

import { useLive, type LiveEvent } from './useLive';
interface UseWeeklyCheckInLiveOptions {
sessionId: string;
currentUserId?: string;
enabled?: boolean;
onEvent?: (event: WeeklyCheckInLiveEvent) => void;
}
interface UseWeeklyCheckInLiveReturn {
isConnected: boolean;
lastEvent: WeeklyCheckInLiveEvent | null;
error: string | null;
}
export type WeeklyCheckInLiveEvent = LiveEvent;
export function useWeeklyCheckInLive({
sessionId,
currentUserId,
enabled = true,
onEvent,
}: UseWeeklyCheckInLiveOptions): UseWeeklyCheckInLiveReturn {
return useLive({
sessionId,
apiPath: 'weekly-checkin',
currentUserId,
enabled,
onEvent,
});
}