diff --git a/apps/api/src/resolvers/user.ts b/apps/api/src/resolvers/user.ts index ac8aee9..faa7bb7 100644 --- a/apps/api/src/resolvers/user.ts +++ b/apps/api/src/resolvers/user.ts @@ -121,7 +121,9 @@ export class UserResolver { await sendEmail( options.email, "Verify Email", - verifyEmailTemplate(`/auth/verify-email/${token}`) + verifyEmailTemplate( + `${process.env.CLIENT_URL}/auth/verify-email/${token}` + ) ); return { user }; diff --git a/apps/storefront/src/components/pages/account/order/OrderCard.tsx b/apps/storefront/src/components/pages/account/order/OrderCard.tsx index 3cd32fd..7eaa361 100644 --- a/apps/storefront/src/components/pages/account/order/OrderCard.tsx +++ b/apps/storefront/src/components/pages/account/order/OrderCard.tsx @@ -33,6 +33,7 @@ import { } from "@/generated/graphql"; import { OrderInfo, + PaymentProviderLogo, colorFromStatus, orderPageTextFromStatus, } from "@/pages/order/[id]"; @@ -41,20 +42,11 @@ import { capitalize } from "@/utils/helpers"; import ConfirmationModal from "@/components/helpers/ConfirmationModal"; import ModalButton from "@/components/ui/ModalButton"; import DividerWithText from "@/components/ui/DividerWithText"; -import { EsewaLogoFull } from "@/config/brands"; import LargeButtonRadioGroup from "@/components/ui/radio/large/LargeButtonRadioGroup"; -import { - KHALTI_LOGO, - paymentOptions, -} from "../../cart/checkout/PaymentSelector"; +import { paymentOptions } from "../../cart/checkout/PaymentSelector"; import { CreateReviewButton } from "../../product/review/ProductReview"; import EmailInvoice from "./EmailInvoice"; -const PaymentProviderLogo = { - khalti: , - esewa: , -}; - interface OrderCardProps { orderItem: OrderDetail; } diff --git a/apps/storefront/src/components/pages/product/review/ProductReview.tsx b/apps/storefront/src/components/pages/product/review/ProductReview.tsx index 7f9a92c..fa040b3 100644 --- a/apps/storefront/src/components/pages/product/review/ProductReview.tsx +++ b/apps/storefront/src/components/pages/product/review/ProductReview.tsx @@ -249,7 +249,7 @@ export const CreateReviewButton = ({ productId, ...rest }: ReviewFormProps) => { if (loading || userLoading) { return ( - ); diff --git a/apps/storefront/src/pages/auth/register.tsx b/apps/storefront/src/pages/auth/register.tsx index 4d728fe..b61f09f 100644 --- a/apps/storefront/src/pages/auth/register.tsx +++ b/apps/storefront/src/pages/auth/register.tsx @@ -66,7 +66,7 @@ const RegisterPage = () => ( > Already have an account?{" "} - Log in with Chakra + Log in with Hamropasal diff --git a/apps/storefront/src/pages/cart/checkout/index.tsx b/apps/storefront/src/pages/cart/checkout/index.tsx index 502570b..34237a8 100644 --- a/apps/storefront/src/pages/cart/checkout/index.tsx +++ b/apps/storefront/src/pages/cart/checkout/index.tsx @@ -141,8 +141,8 @@ const CheckoutPage = () => { tAmt: createPayment.createPayment.tAmt, pid: createPayment.createPayment.pid, scd: createPayment.createPayment.scd, - su: `http://localhost:3000/cart/checkout/result`, - fu: `http://localhost:3000/cart/checkout/result`, + su: `${process.env.CLIENT_URL}/cart/checkout/result`, + fu: `${process.env.CLIENT_URL}/cart/checkout/result`, }; const form = document.createElement("form"); diff --git a/apps/storefront/src/pages/order/[id].tsx b/apps/storefront/src/pages/order/[id].tsx index e7c00ca..ed8678f 100644 --- a/apps/storefront/src/pages/order/[id].tsx +++ b/apps/storefront/src/pages/order/[id].tsx @@ -25,10 +25,15 @@ import { PriceTag } from "@/components/shared/product/PriceTag"; import { capitalize } from "@/utils/helpers"; import UnderlineLink from "@/components/ui/UnderlineLink"; import PageLoader from "@/components/shared/PageLoader"; -import { KHALTI_LOGO } from "@/components/pages/cart/checkout/PaymentSelector"; import TrackingTimeline from "@/components/pages/account/order/TrackingTimelines"; +import { EsewaLogoFull, KhaltiLogoFull } from "@/config/brands"; import { BRAND_NAME } from "../../../constants"; +export const PaymentProviderLogo = { + khalti: , + esewa: , +}; + const OrderPage = () => { const router = useRouter(); const { data: me, loading: userLoading, error: userError } = useMeQuery(); @@ -167,8 +172,10 @@ const OrderPage = () => { - {successPayment?.provider?.toUpperCase() === "KHALTI" ? ( - + {successPayment?.provider ? ( + PaymentProviderLogo[ + successPayment.provider as keyof typeof PaymentProviderLogo + ] ) : ( {successPayment?.provider?.toUpperCase() ?? "UNPAID"}