feat(disputes): migrate disputes and reviews to backend API

This commit is contained in:
zetaloop
2026-03-01 16:25:33 +08:00
parent 9739c94bdc
commit f189ec9846
7 changed files with 437 additions and 120 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ export default async function PlayerDetailPage({ params }: { params: Promise<{ i
notFound()
}
const playerReviews = listReviewsByTargetUser(player.id)
const playerReviews = await listReviewsByTargetUser(player.id)
const playerServices =
player.services && player.services.length > 0
? player.services
+1 -1
View File
@@ -25,7 +25,7 @@ export default async function ShopPage({ params }: PageProps) {
const [shopPlayers, allServices] = await Promise.all([listPlayersByShop(shop.id), listServices()])
const playerIds = shopPlayers.map((p) => p.id)
const shopServices = allServices.filter((s) => playerIds.includes(s.playerId))
const shopReviews = listReviews().filter((r) => playerIds.includes(r.toUserId))
const shopReviews = (await listReviews()).filter((r) => playerIds.includes(r.toUserId))
const sortedSections = [...shop.templateConfig.sections]
.filter((s) => s.enabled)
.sort((a, b) => a.order - b.order)