fix: 0 票最佳匹配时展示"都不太满意"引导页,替代尴尬的 Trophy 展示
This commit is contained in:
@@ -32,9 +32,15 @@ export async function GET(
|
||||
matchLikes = data.users.length;
|
||||
} else if (allFinished && data.restaurants.length > 0) {
|
||||
const best = findBestMatch(data.likes, data.restaurants);
|
||||
match = best.id;
|
||||
matchType = "best";
|
||||
matchLikes = best.likes;
|
||||
if (best.likes > 0) {
|
||||
match = best.id;
|
||||
matchType = "best";
|
||||
matchLikes = best.likes;
|
||||
} else {
|
||||
match = best.id;
|
||||
matchType = "no_match";
|
||||
matchLikes = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const likeCounts: Record<string, number> = {};
|
||||
|
||||
Reference in New Issue
Block a user