fix: 刷新页面后恢复滑动进度,防止重复 swipe
服务端 GET room 返回 swipeCounts,前端据此恢复 currentIndex、 swipeHistory 和引导状态;swipe API 增加幂等性检查,跳过已滑过的卡片。
This commit is contained in:
@@ -30,6 +30,7 @@ export function useRoomPolling(roomId: string) {
|
||||
matchType: data?.matchType ?? null,
|
||||
matchLikes: data?.matchLikes ?? 0,
|
||||
likeCounts: data?.likeCounts ?? {},
|
||||
swipeCounts: data?.swipeCounts ?? {},
|
||||
restaurants: data?.restaurants ?? [],
|
||||
isLoading,
|
||||
error,
|
||||
|
||||
Reference in New Issue
Block a user