feat: 增加滑动参与感 - 进度条、实时气泡、热度标签

- 卡片上方显示滑动进度条和计数 (3/15)
- 轮询检测到当前卡片新增 like 时弹出"有人也想去这家!"气泡
- 卡片图片角落显示"🔥N 人想去"热度标签
- 后端 GET /api/room/[id] 新增 likeCounts 字段
This commit is contained in:
2026-02-24 17:36:04 +08:00
parent a72f7ed884
commit fb49e21eb2
7 changed files with 94 additions and 11 deletions
+4 -2
View File
@@ -14,8 +14,9 @@ export default function RoomPage() {
const [userId, setUserId] = useState("");
const [joined, setJoined] = useState(false);
const { userCount, match, matchType, matchLikes, restaurants, mutate } =
useRoomPolling(roomId);
const {
userCount, match, matchType, matchLikes, likeCounts, restaurants, mutate,
} = useRoomPolling(roomId);
useEffect(() => {
const id = getUserId();
@@ -54,6 +55,7 @@ export default function RoomPage() {
matchedRestaurantId={match}
matchType={matchType}
matchLikes={matchLikes}
likeCounts={likeCounts}
userCount={userCount}
onReset={handleReset}
/>