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}