feat: 房间创建者管理权限——锁定房间、踢人、结束投票

This commit is contained in:
2026-02-24 21:01:24 +08:00
parent fc0a2a018b
commit 07ffe42176
11 changed files with 507 additions and 9 deletions
+13 -2
View File
@@ -20,7 +20,8 @@ export default function RoomPage() {
const leavingRef = useRef(false);
const {
userCount, match, matchType, matchLikes, runnerUps, likeCounts, swipeCounts, restaurants, notFound, mutate,
userCount, match, matchType, matchLikes, runnerUps, likeCounts, swipeCounts,
restaurants, notFound, mutate, creatorId, locked, users,
} = useRoomPolling(roomId);
useEffect(() => {
@@ -117,7 +118,17 @@ export default function RoomPage() {
return (
<div className="flex h-dvh flex-col bg-background">
<TopNav roomId={roomId} userCount={userCount} onExit={handleExitRequest} />
<TopNav
roomId={roomId}
userCount={userCount}
onExit={handleExitRequest}
isCreator={userId === creatorId}
userId={userId}
users={users}
locked={locked}
swipeCounts={swipeCounts}
totalCards={restaurants.length}
/>
<SwipeDeck
restaurants={restaurants}
roomId={roomId}