diff --git a/src/components/ActionButtons.tsx b/src/components/ActionButtons.tsx index 29f600f..e9e6f8b 100644 --- a/src/components/ActionButtons.tsx +++ b/src/components/ActionButtons.tsx @@ -14,7 +14,7 @@ export default function ActionButtons({ disabled, }: ActionButtonsProps) { return ( -
+
; localIndex: number; total: number; userProfiles: Record; + onUndo: () => void; }) { const others = Object.entries(swipeCounts).filter(([id]) => id !== userId); - if (others.length === 0) return null; const myProfile = userProfiles[userId]; const myAvatar = myProfile?.avatar ?? getAvatar(userId).emoji; const myAvatarBg = myProfile ? getAvatarBg(myProfile.avatar) : "bg-emerald-500/20"; return ( -
- - - {myAvatar} - - 你 {localIndex}/{total} - - {others.map(([id, count]) => { - const finished = count >= total; - const profile = userProfiles[id]; - const emoji = profile?.avatar ?? getAvatar(id).emoji; - const bg = profile ? getAvatarBg(profile.avatar) : getAvatar(id).bg; - const label = profile?.username ?? ""; - return ( - - - {emoji} - - {label && {label}} - {count}/{total} - {finished && } +
+
+ + + {myAvatar} - ); - })} + 你 {localIndex}/{total} + + {others.map(([id, count]) => { + const finished = count >= total; + const profile = userProfiles[id]; + const emoji = profile?.avatar ?? getAvatar(id).emoji; + const bg = profile ? getAvatarBg(profile.avatar) : getAvatar(id).bg; + const label = profile?.username ?? ""; + return ( + + + {emoji} + + {label && {label}} + {count}/{total} + {finished && } + + ); + })} +
+
); } @@ -323,43 +334,20 @@ export default function SwipeDeck({ return ( <> - {!allSwiped && !resolvedMatchId && ( -
-
-
- -
- - {currentIndex}/{restaurants.length} - - -
- -
- )} -
+ {!allSwiped && !resolvedMatchId && ( +
+ +
+ )} {currentIndex === 0 && !resolvedMatchId && guideVisible && ( setGuideVisible(false)} /> )} diff --git a/src/components/TopNav.tsx b/src/components/TopNav.tsx index 9c8b822..e078c08 100644 --- a/src/components/TopNav.tsx +++ b/src/components/TopNav.tsx @@ -1,7 +1,7 @@ "use client"; import { useState, useCallback } from "react"; -import { Users, QrCode, LogOut, Crown, Lock } from "lucide-react"; +import { QrCode, LogOut, Crown, Lock } from "lucide-react"; import { motion, AnimatePresence } from "framer-motion"; import QrInviteModal from "./QrInviteModal"; import RoomManageModal from "./RoomManageModal"; @@ -10,7 +10,7 @@ import { getSceneConfig } from "@/lib/sceneConfig"; interface TopNavProps { roomId: string; - userCount: number; + userCount?: number; onExit?: () => void; isCreator?: boolean; userId?: string; @@ -47,14 +47,21 @@ export default function TopNav({ return ( <> -