diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 358e537..bcabe47 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -47,6 +47,8 @@ export function Home({ userId }: HomeProps) { navigate(`/private/${roomName}`) } + const isRoomNameValid = roomName.length > 0 + return (
@@ -83,6 +85,7 @@ export function Home({ userId }: HomeProps) { sx={{ marginTop: 2, }} + disabled={!isRoomNameValid} > Join public room @@ -93,6 +96,7 @@ export function Home({ userId }: HomeProps) { marginTop: 2, marginLeft: 2, }} + disabled={!isRoomNameValid} > Join private room