feat(tip): add coffee tipping page

This commit is contained in:
2026-07-08 19:21:42 +08:00
parent c1aba64573
commit cb7791dd8d
14 changed files with 1224 additions and 4 deletions
+23
View File
@@ -0,0 +1,23 @@
"use client";
import { useSearchParams } from "next/navigation";
import type { PayChannel } from "@/data/dto/payment";
import { TipScreen } from "./tip-screen";
function toPayChannel(value: string | null): PayChannel | null {
if (value === "ezpay" || value === "stripe") return value;
return null;
}
export function TipPageClient() {
const searchParams = useSearchParams();
return (
<TipScreen
shouldResumePendingOrder={searchParams.get("paymentReturn") === "1"}
initialPayChannel={toPayChannel(searchParams.get("payChannel"))}
/>
);
}