Skip to content

Commit

Permalink
feat(web): remove users online and edit heading of queue screen
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocroh committed Jun 14, 2024
1 parent b2d1a31 commit b7bfd08
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/web/app/room/queue/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import useWebSocket from 'react-use-websocket'
import { useRouter } from 'next/navigation'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { Card, CardContent } from '@/components/ui/card'
import { VideoPlayer } from '@/components/video-player'
Expand Down Expand Up @@ -36,6 +35,10 @@ export default function Page(): JSX.Element {
const [usersOnline, setUsersOnline] = useState(null)
const [inQueue, setInQueue] = useState(false)

useEffect(() => {
console.log({ usersOnline })
}, [usersOnline])

const { sendJsonMessage } = useWebSocket(env.NEXT_PUBLIC_SOCKET_URL!, {
onOpen: () => {
sendJsonMessage({
Expand Down Expand Up @@ -101,13 +104,10 @@ export default function Page(): JSX.Element {
<main className="flex h-auto flex-col">
<section className="align-center container mb-5 flex h-full place-content-center content-center justify-center px-4 md:px-8">
<div className="flex w-full flex-col items-center">
<h1 className="mt-6 text-center text-xl sm:text-[2em] md:w-2/3">
<h1 className="mt-6 text-center leading-tight md:w-2/3">
Before you start practicing, make sure to check your microphone and
camera first.
</h1>
<Badge className="md:text-md mt-4 text-sm">
Users Online: {usersOnline}
</Badge>
<div className="mt-4 flex w-full flex-col items-center md:p-5">
<Card className="border-slate-5 bg-slate-6 w-full border border-b-0 md:w-3/5">
<CardContent className="p-4 md:p-6">
Expand Down Expand Up @@ -150,7 +150,7 @@ export default function Page(): JSX.Element {
</h2>
<Button
onClick={onConnect}
className="z-10 h-12 w-full rounded-xl text-lg font-semibold sm:w-auto"
className="z-10 w-full rounded-xl font-normal sm:w-auto"
>
{inQueue ? 'Cancel' : "I'm Ready"}
</Button>
Expand Down

0 comments on commit b7bfd08

Please sign in to comment.