From a6f85ba4122ab35d7c9458684fd412163db87419 Mon Sep 17 00:00:00 2001 From: Mayur Date: Mon, 1 Dec 2025 16:35:44 +0530 Subject: [PATCH] feat: Version Update SubOs-Frontend to 1.0.95 and added the dynamic currency in the checkout session --- apps/web/components/UpgradePlan/Plans/PlanCard.tsx | 5 ++++- apps/web/package.json | 2 +- pnpm-lock.yaml | 10 ++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/web/components/UpgradePlan/Plans/PlanCard.tsx b/apps/web/components/UpgradePlan/Plans/PlanCard.tsx index 657e135e8..b3b19af41 100644 --- a/apps/web/components/UpgradePlan/Plans/PlanCard.tsx +++ b/apps/web/components/UpgradePlan/Plans/PlanCard.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { plansApi, useSubscription } from 'subos-frontend'; +import { plansApi, useSubscription, useCountryAndCurrency } from 'subos-frontend'; import { Card, Text, Badge, Stack, Divider, LoadingOverlay } from '@mantine/core'; import { Button } from '@ui/button'; import { colors, NOTIFICATION_KEYS, PLANCODEENUM, ROUTES } from '@config'; @@ -18,6 +18,8 @@ export function PlanCard({ plan, isYearly }: PlanCardProps) { const { profileInfo } = useAppState(); const { classes } = useStyles(); const { createPaymentSession } = plansApi; + const { currency } = useCountryAndCurrency(); + const [isLoading, setIsLoading] = useState(false); const { subscription, fetchSubscription } = useSubscription(); @@ -48,6 +50,7 @@ export function PlanCard({ plan, isYearly }: PlanCardProps) { returnUrl: `${window.location.origin}${ROUTES.SUBSCRIPTION_STATUS}`, externalId: profileInfo?.email, cancelUrl: `${window.location.origin}${ROUTES.PAYMENT_CANCEL}`, + currency, }); if (response?.success && response?.data?.checkoutUrl) { window.location.href = response?.data?.checkoutUrl; diff --git a/apps/web/package.json b/apps/web/package.json index 0d0b3ca8e..916e368a4 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -53,7 +53,7 @@ "react-hook-form": "^7.39.1", "sharp": "^0.32.6", "typescript": "4.9.5", - "subos-frontend": "^1.0.94" + "subos-frontend": "^1.0.95" }, "devDependencies": { "@storybook/builder-webpack5": "^6.5.16", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e1385a3b5..cabcf285b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -489,8 +489,8 @@ importers: specifier: ^0.32.6 version: 0.32.6 subos-frontend: - specifier: ^1.0.94 - version: 1.0.94(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.0.95 + version: 1.0.95(react-dom@18.2.0)(react@18.2.0) typescript: specifier: 4.9.5 version: 4.9.5 @@ -18968,6 +18968,7 @@ packages: /normalize-path@2.1.1: resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: remove-trailing-separator: 1.1.0 @@ -21944,6 +21945,7 @@ packages: /remove-trailing-separator@1.1.0: resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} + requiresBuild: true /renderkid@2.0.7: resolution: {integrity: sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ==} @@ -23465,8 +23467,8 @@ packages: resolution: {integrity: sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==} dev: false - /subos-frontend@1.0.94(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-pCYGpsBn2m9VqBedysdejdfjehClYD9ViBweA7szF5HRDaT4+UCmNZ42vId+VdQUUNKS2LLILsilK+XiMAqx2g==} + /subos-frontend@1.0.95(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-vGJeCdPsW9CE+dK5uhHfVKb+L5i7YyGipz0DscbfY1vB+x3aoDBQMdGmTxVV6i6Tjh6v6m4rgxS7pdFGE+w8Rw==} peerDependencies: react: '>=18' react-dom: '>=18'