Skip to content

Commit

Permalink
Fix export
Browse files Browse the repository at this point in the history
  • Loading branch information
timuric committed Aug 21, 2024
1 parent 71b55d2 commit 89c9958
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/app/api/demo-payment/route.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { DEMO_PAYMENT_GATEWAY } from "@/checkout/sections/PaymentSection/Demo/PaymentOptions";

const removeWhiteSpace = (str: string): string => {
return str.replaceAll(/[\t\n]+/g, " ");
};

const url = `https://${process.env.VERCEL_BRANCH_URL}`;
export const DEMO_PAYMENT_GATEWAY = `storefront.demo-payment`;

export async function GET() {
return Response.json({
Expand Down
3 changes: 2 additions & 1 deletion src/checkout/sections/PaymentSection/Demo/PaymentOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { useCheckoutCompleteMutation, useTransactionInitializeMutation } from "@
import { useCheckout } from "@/checkout/hooks/useCheckout";
import { replaceUrl } from "@/checkout/lib/utils/url";
import { Button } from "@/checkout/components";
import { DEMO_PAYMENT_GATEWAY } from "@/app/api/demo-payment/route";

export const DEMO_PAYMENT_GATEWAY = `storefront.demo-payment`;

export const DemoPayment = () => {
const { checkout } = useCheckout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useCheckout } from "@/checkout/hooks/useCheckout";
import { useSubmit } from "@/checkout/hooks/useSubmit";
import { type MightNotExist } from "@/checkout/lib/globalTypes";
import { type ParsedPaymentGateways } from "@/checkout/sections/PaymentSection/types";
import { DEMO_PAYMENT_GATEWAY } from "@/app/api/demo-payment/route";
import { DEMO_PAYMENT_GATEWAY } from "@/checkout/sections/PaymentSection/Demo/PaymentOptions";

export const usePaymentGatewaysInitialize = () => {
const {
Expand Down

0 comments on commit 89c9958

Please sign in to comment.