From e234a76293b01ad376f02b7f1614ce16485bcdae Mon Sep 17 00:00:00 2001 From: Jonas Schell Date: Fri, 20 Jan 2023 11:18:39 +0100 Subject: [PATCH] Fix statically rendered, missing room param warning (#9) --- pages/rooms/[name].tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pages/rooms/[name].tsx b/pages/rooms/[name].tsx index c5ef61f..0e49bea 100644 --- a/pages/rooms/[name].tsx +++ b/pages/rooms/[name].tsx @@ -4,9 +4,8 @@ import { LocalUserChoices, useToken, VideoConference, - Chat, } from '@livekit/components-react'; -import { AudioCaptureOptions, RoomOptions, VideoCaptureOptions } from 'livekit-client'; +import { RoomOptions } from 'livekit-client'; import type { NextPage } from 'next'; import Head from 'next/head'; @@ -19,9 +18,6 @@ const Home: NextPage = () => { const { name: roomName } = router.query; const [preJoinChoices, setPreJoinChoices] = useState(undefined); - if (!roomName || Array.isArray(roomName)) { - return

no room param passed

; - } return ( <> @@ -30,7 +26,7 @@ const Home: NextPage = () => {
- {preJoinChoices ? ( + {roomName && !Array.isArray(roomName) && preJoinChoices ? (