"use client"; import { useEffect, useState } from "react"; import { Box, Spinner, Text, VStack } from "@chakra-ui/react"; import { useRouter } from "next/navigation"; import { useRoomGetByName } from "../../lib/apiHooks"; import MinimalHeader from "../../components/MinimalHeader"; interface MeetingPageProps { params: { roomName: string; meetingId: string; }; } export default function MeetingPage({ params }: MeetingPageProps) { const { roomName, meetingId } = params; const router = useRouter(); // Fetch room data const roomQuery = useRoomGetByName(roomName); const room = roomQuery.data; const isLoading = roomQuery.isLoading; const error = roomQuery.error; // Redirect to selection if room not found useEffect(() => { if (roomQuery.isError) { router.push(`/${roomName}`); } }, [roomQuery.isError, router, roomName]); if (isLoading) { return ( Loading meeting... ); } if (error || !room) { return ( Meeting not found ); } return ( Meeting Room Meeting Interface Coming Soon This is where the video call, transcription, and meeting controls will be displayed. Meeting ID: {meetingId} ); }