add QR code to display view lobby screen

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 14:59:37 +01:00
parent 2b51448b83
commit 2f1d44de04
3 changed files with 315 additions and 83 deletions

View File

@@ -17,6 +17,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.577.0",
"qrcode.react": "^4.2.0",
"react": "latest",
"react-dom": "latest",
"tailwind-merge": "^3.5.0",

View File

@@ -1,4 +1,5 @@
import { useState } from "react"
import { QRCodeSVG } from "qrcode.react"
import { createFileRoute } from "@tanstack/react-router"
import { useWebSocket } from "@/hooks/use-websocket"
import { useRoomStore } from "@/stores/room-store"
@@ -158,6 +159,7 @@ function LobbyDisplay({ roomCode }: { roomCode: string }) {
<>Tap the code to copy</>
)}
</p>
<QRCodeSVG value={joinUrl} size={192} level="M" />
<p className="text-muted-foreground">
Go to <span className="font-mono font-medium">{joinUrl}</span>
</p>