feat: add community sorting/filtering and quote post input

This commit is contained in:
zetaloop
2026-02-20 23:08:15 +08:00
parent 505ae9d683
commit 44669d5606
@@ -15,14 +15,15 @@ import {
} from "@/components/ui/select"
import { Switch } from "@/components/ui/switch"
import { mockShops } from "@/lib/mock-data"
import type { Shop } from "@/lib/types"
export default function ShopRulesPage() {
const shop = mockShops[0]
const [allowMultiShop, setAllowMultiShop] = useState(shop.allowMultiShop)
const [allowIndependentOrders, setAllowIndependentOrders] = useState(shop.allowIndependentOrders)
const [dispatchMode, setDispatchMode] = useState(shop.dispatchMode)
const [commissionType, setCommissionType] = useState(shop.commissionType)
const [dispatchMode, setDispatchMode] = useState<Shop["dispatchMode"]>(shop.dispatchMode)
const [commissionType, setCommissionType] = useState<Shop["commissionType"]>(shop.commissionType)
const [commissionValue, setCommissionValue] = useState(shop.commissionValue.toString())
const handleSave = () => {
@@ -83,7 +84,7 @@ export default function ShopRulesPage() {
<Label></Label>
<Select
value={dispatchMode}
onValueChange={(v: "manual" | "auto") => setDispatchMode(v)}
onValueChange={(v) => setDispatchMode(v as Shop["dispatchMode"])}
>
<SelectTrigger>
<SelectValue />
@@ -110,7 +111,7 @@ export default function ShopRulesPage() {
<Label></Label>
<Select
value={commissionType}
onValueChange={(v: "fixed" | "percentage") => setCommissionType(v)}
onValueChange={(v) => setCommissionType(v as Shop["commissionType"])}
>
<SelectTrigger>
<SelectValue />