From 777f3cbec41130dcb3ba259b0e9c31ecae2b4760 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 23 Aug 2025 08:30:32 -0400 Subject: [PATCH] merms panel --- src/component/subscription/Subscription.jsx | 116 +++++++++++--------- 1 file changed, 63 insertions(+), 53 deletions(-) diff --git a/src/component/subscription/Subscription.jsx b/src/component/subscription/Subscription.jsx index e1ebcdd..78faab5 100644 --- a/src/component/subscription/Subscription.jsx +++ b/src/component/subscription/Subscription.jsx @@ -1,18 +1,18 @@ import React from 'react' import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS"; import getImage from "../../utils/getImage"; -import { getSubscriptions } from '../../services/services'; -import { useQuery } from '@tanstack/react-query'; +import {getSubscriptions} from '../../services/services'; +import {useQuery} from '@tanstack/react-query'; import queryKeys from '../../services/queryKeys'; import siteLinks from "../../links/siteLinks"; -import { Link, useNavigate } from 'react-router-dom' +import {Link, useNavigate} from 'react-router-dom' export default function Subscription() { const navigate = useNavigate() - const pricingFields ={ - starter: { name: 'Starter', price: 5.99, active: true }, - basic: { name: 'Basic', price: 12.99, active: true }, - premium: { name: 'Premium', price: 20.00, active: true }, + const pricingFields = { + starter: {name: 'Starter', price: 5.99, active: true}, + basic: {name: 'Basic', price: 12.99, active: true}, + premium: {name: 'Premium', price: 20.00, active: true}, } const {data, isFetching, isError, error} = useQuery({ @@ -32,59 +32,69 @@ export default function Subscription() { return ( <> - - - {isFetching ? - <> -
-

Loading...

-
- - : isError ? -
-

{error.message}

-
- : -
-
-
-
-
-
Your Subscription(s)
-

{currentSubscription?.display_name}

-
-
-
-
+ + {isFetching ? <> - {Object.entries(otherSubscriptions)?.map(([key, value]) => ( - -
-
-
-
-
{value.display_name}
-

${value.monthly}

-

/ Monthly

-
    - {value?.items?.map(item =>( -
  1. {item.description}
  2. - ))} -
-
- +
+

Loading...

+
+ + : isError ? +
+

{error.message}

+
+ : +
+
+
+
+
+
Your Subscription(s)
+

{currentSubscription?.display_name}

+
+
+
+ Next Payment: {currentSubscription?.next_payment} +
+ + <> + {Object.entries(otherSubscriptions)?.map(([key, value]) => ( + +
+
+
+
+
{value.display_name}
+

${value.monthly}

+

/ Monthly

+
    + {value?.items?.map(item => ( +
  1. {item.description}
  2. + ))} +
+ +
+
+
+ +
+
+
+ + ))} + +
- - ))} - - -
- } + } ) } \ No newline at end of file