From 65db255e20dfa0cb1a12d8b9912d073ba03a4d2e Mon Sep 17 00:00:00 2001 From: zetaloop Date: Sat, 25 Apr 2026 14:49:57 +0800 Subject: [PATCH] fix(shop): render backend template defaults --- app/(main)/shop/[id]/page.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/(main)/shop/[id]/page.tsx b/app/(main)/shop/[id]/page.tsx index 4cad481..920ade2 100644 --- a/app/(main)/shop/[id]/page.tsx +++ b/app/(main)/shop/[id]/page.tsx @@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Separator } from "@/components/ui/separator" import { getShopById, listPlayersByShop, listReviews, listServices } from "@/lib/api" +import { getShopSections } from "@/lib/domain/shop-template" import { Gamepad2, Megaphone, ShoppingBag, Star, Users } from "lucide-react" import Image from "next/image" import Link from "next/link" @@ -26,9 +27,7 @@ export default async function ShopPage({ params }: PageProps) { const playerIds = shopPlayers.map((p) => p.id) const shopServices = allServices.filter((s) => playerIds.includes(s.playerId)) const shopReviews = await listReviews() - const sortedSections = [...shop.templateConfig.sections] - .filter((s) => s.enabled) - .sort((a, b) => a.order - b.order) + const sortedSections = getShopSections(shop).filter((s) => s.enabled) return (
@@ -84,7 +83,7 @@ export default async function ShopPage({ params }: PageProps) {
- {shop.owner.nickname[0]} + {shop.owner.nickname[0] ?? "店"}

店长:{shop.owner.nickname}