feat: add Weekly Check-in feature with models, UI components, and session management for enhanced team collaboration
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 6m24s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 6m24s
This commit is contained in:
31
src/hooks/useWeeklyCheckInLive.ts
Normal file
31
src/hooks/useWeeklyCheckInLive.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
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,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user