meeting page frontend fixes

This commit is contained in:
Igor Loskutov
2025-09-17 12:18:25 -04:00
parent 3bd2190aa8
commit 1764c591c4
16 changed files with 259 additions and 67 deletions

View File

@@ -12,7 +12,7 @@ import { useAuth } from "./AuthProvider";
* or, limitation or incorrect usage of .d type generator from json schema
* */
const useAuthReady = () => {
export const useAuthReady = () => {
const auth = useAuth();
return {
@@ -695,8 +695,6 @@ const MEETING_LIST_PATH_PARTIALS = [
];
export function useRoomActiveMeetings(roomName: string | null) {
const { isAuthenticated } = useAuthReady();
return $api.useQuery(
"get",
"/v1/rooms/{room_name}/meetings/active" satisfies `/v1/rooms/{room_name}/${typeof MEETINGS_ACTIVE_PATH_PARTIAL}`,
@@ -706,7 +704,28 @@ export function useRoomActiveMeetings(roomName: string | null) {
},
},
{
enabled: !!roomName && isAuthenticated,
enabled: !!roomName,
},
);
}
export function useRoomGetMeeting(
roomName: string | null,
meetingId: string | null,
) {
return $api.useQuery(
"get",
"/v1/rooms/{room_name}/meetings/{meeting_id}",
{
params: {
path: {
room_name: roomName!,
meeting_id: meetingId!,
},
},
},
{
enabled: !!roomName && !!meetingId,
},
);
}