diff --git a/components/shipping/Results.tsx b/components/shipping/Results.tsx index 6053e36..347199f 100644 --- a/components/shipping/Results.tsx +++ b/components/shipping/Results.tsx @@ -1,6 +1,6 @@ import { AppContext } from "../../apps/deco/wake.ts"; -import { ComponentProps } from "../../sections/Component.tsx"; +import { type ComponentProps } from "../../sections/Component.tsx"; import { ShippingQuotesQuery } from "apps/wake/utils/graphql/storefront.graphql.gen.ts"; import type { Props as SKU } from "apps/wake/actions/shippingSimulation.ts"; @@ -14,9 +14,8 @@ function formatShippingEstimate(estimate: number): string { export async function action(props: Props, req: Request, ctx: AppContext) { const form = await req.formData(); - try { - const result = await (ctx as any).invoke.wake.actions.review.create({ + const result = await (ctx as any).invoke.wake.actions.shippingSimulation({ ...props.items[0], cep: `${form.get("postalCode") ?? ""}`, }) as ShippingQuotesQuery["shippingQuotes"]; @@ -41,10 +40,10 @@ export default function Results({ result }: ComponentProps) {