feat: 房间创建者管理权限——锁定房间、踢人、结束投票
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user