refactor: rewrite and expand mock data into modular files

This commit is contained in:
zetaloop
2026-02-21 00:24:03 +08:00
parent 44669d5606
commit 7ed7bad975
47 changed files with 1891 additions and 767 deletions
@@ -18,7 +18,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table"
import { mockPlayers } from "@/lib/mock-data"
import { mockPlayers } from "@/lib/mock"
const shopPlayers = mockPlayers.filter((p) => p.shopId === "shop1")
@@ -9,7 +9,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table"
import { mockOrders, mockTransactions } from "@/lib/mock-data"
import { mockOrders, mockTransactions } from "@/lib/mock"
export default function ShopIncomePage() {
const completedOrders = mockOrders.filter((o) => o.status === "completed")
@@ -12,7 +12,7 @@ import {
TableRow,
} from "@/components/ui/table"
import { statusLabels } from "@/lib/constants"
import { mockOrders } from "@/lib/mock-data"
import { mockOrders } from "@/lib/mock"
export default function ShopOrdersPage() {
const totalOrders = mockOrders.length
+1 -1
View File
@@ -7,7 +7,7 @@ import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { Separator } from "@/components/ui/separator"
import { Textarea } from "@/components/ui/textarea"
import { mockShops } from "@/lib/mock-data"
import { mockShops } from "@/lib/mock"
export default function ShopManagementPage() {
const shop = mockShops[0]
@@ -14,7 +14,7 @@ import {
SelectValue,
} from "@/components/ui/select"
import { Switch } from "@/components/ui/switch"
import { mockShops } from "@/lib/mock-data"
import { mockShops } from "@/lib/mock"
import type { Shop } from "@/lib/types"
export default function ShopRulesPage() {
@@ -6,7 +6,7 @@ import { type DragEvent, useEffect, useState } from "react"
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { Switch } from "@/components/ui/switch"
import { mockShops } from "@/lib/mock-data"
import { mockShops } from "@/lib/mock"
import type { ShopSection } from "@/lib/types"
const sectionLabels: Record<ShopSection["type"], string> = {