add test mode to checkout

This commit is contained in:
2026-01-20 10:41:32 -03:00
parent fde5c31ffc
commit 49e0c3333b
13 changed files with 847 additions and 493 deletions

View File

@@ -148,12 +148,17 @@ type Order = Order_ & {
}
export async function loader({ context, request, params }: Route.LoaderArgs) {
const order = (await req({
const r = await req({
url: `/orders/${params.id}`,
context,
request
}).then((r) => r.json())) as Order
})
if (!r.ok) {
throw new Response(null, { status: r.status })
}
const order = (await r.json()) as Order
return { order }
}