From c2a1c0ddb7794358df4124a0dead9bdff2c4e679 Mon Sep 17 00:00:00 2001 From: Timur Carpeev Date: Wed, 21 Aug 2024 14:08:03 +0200 Subject: [PATCH] Fix export --- src/app/api/demo-payment/route.ts | 2 +- src/checkout/sections/PaymentSection/Demo/PaymentOptions.tsx | 3 +-- src/checkout/sections/PaymentSection/Demo/metadata.ts | 1 + .../sections/PaymentSection/usePaymentGatewaysInitialize.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 src/checkout/sections/PaymentSection/Demo/metadata.ts diff --git a/src/app/api/demo-payment/route.ts b/src/app/api/demo-payment/route.ts index 3ed7c7fb9..538dfd30b 100644 --- a/src/app/api/demo-payment/route.ts +++ b/src/app/api/demo-payment/route.ts @@ -1,4 +1,4 @@ -import { DEMO_PAYMENT_GATEWAY } from "@/checkout/sections/PaymentSection/Demo/PaymentOptions"; +import { DEMO_PAYMENT_GATEWAY } from "@/checkout/sections/PaymentSection/Demo/metadata"; const removeWhiteSpace = (str: string): string => { return str.replaceAll(/[\t\n]+/g, " "); diff --git a/src/checkout/sections/PaymentSection/Demo/PaymentOptions.tsx b/src/checkout/sections/PaymentSection/Demo/PaymentOptions.tsx index f41819c2e..5773379e3 100644 --- a/src/checkout/sections/PaymentSection/Demo/PaymentOptions.tsx +++ b/src/checkout/sections/PaymentSection/Demo/PaymentOptions.tsx @@ -7,8 +7,7 @@ import { useCheckoutCompleteMutation, useTransactionInitializeMutation } from "@ import { useCheckout } from "@/checkout/hooks/useCheckout"; import { replaceUrl } from "@/checkout/lib/utils/url"; import { Button } from "@/checkout/components"; - -export const DEMO_PAYMENT_GATEWAY = `storefront.demo-payment`; +import { DEMO_PAYMENT_GATEWAY } from "@/checkout/sections/PaymentSection/Demo/metadata"; export const DemoPayment = () => { const { checkout } = useCheckout(); diff --git a/src/checkout/sections/PaymentSection/Demo/metadata.ts b/src/checkout/sections/PaymentSection/Demo/metadata.ts new file mode 100644 index 000000000..24fd1a1f2 --- /dev/null +++ b/src/checkout/sections/PaymentSection/Demo/metadata.ts @@ -0,0 +1 @@ +export const DEMO_PAYMENT_GATEWAY = `storefront.demo-payment`; diff --git a/src/checkout/sections/PaymentSection/usePaymentGatewaysInitialize.ts b/src/checkout/sections/PaymentSection/usePaymentGatewaysInitialize.ts index 41257a5d9..7b44fe926 100644 --- a/src/checkout/sections/PaymentSection/usePaymentGatewaysInitialize.ts +++ b/src/checkout/sections/PaymentSection/usePaymentGatewaysInitialize.ts @@ -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 "@/checkout/sections/PaymentSection/Demo/PaymentOptions"; +import { DEMO_PAYMENT_GATEWAY } from "@/checkout/sections/PaymentSection/Demo/metadata"; export const usePaymentGatewaysInitialize = () => { const {