From bd854714d0e059b5425bd84e894bebf3c332aca7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-BC3NEC6\\chiefsoft" Date: Sun, 19 Feb 2023 17:54:44 -0500 Subject: [PATCH] pricing page --- .../Subscriptions/PricingListTable.jsx | 22 ++- src/components/Subscriptions/index.jsx | 137 +++++++----------- .../Tracking/TrackAction/TrackEntryWidget.jsx | 4 - src/components/Tracking/TrackAction/index.jsx | 29 +++- src/services/SiteService.js | 2 +- 5 files changed, 93 insertions(+), 101 deletions(-) diff --git a/src/components/Subscriptions/PricingListTable.jsx b/src/components/Subscriptions/PricingListTable.jsx index 244758a..411246a 100644 --- a/src/components/Subscriptions/PricingListTable.jsx +++ b/src/components/Subscriptions/PricingListTable.jsx @@ -2,22 +2,30 @@ import React, { useState } from "react"; import SellAnalysChart from "../Charts/SellAnalysChart"; import SelectBox from "../Helpers/SelectBox"; -export default function PricingListTable() { +export default function PricingListTable(props) { + + // debugger; return (
+
    + { + props.priceDetail.features.map((item,index)=>(
    -

    - Sell Analize -

    -
    - +
  • + {item} +
  • + +
+ )) + } +
- uuuuu +
diff --git a/src/components/Subscriptions/index.jsx b/src/components/Subscriptions/index.jsx index 7de495b..41c7175 100644 --- a/src/components/Subscriptions/index.jsx +++ b/src/components/Subscriptions/index.jsx @@ -1,4 +1,5 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; + import country1 from "../../assets/images/country-1.png"; import country2 from "../../assets/images/country-2.png"; import country3 from "../../assets/images/country-3.png"; @@ -10,8 +11,32 @@ import Layout from "../Partials/Layout"; import SellProductHistoryTable from "./SellProductHistoryTable"; import SubScriptionTop from "./SubScriptionTop"; +import SiteService from "../../services/SiteService"; import PricingListTable from "./PricingListTable"; export default function Subscriptions() { + const site_api = new SiteService(); + const [pricingData, setPricingData] = useState([]); + const getPricingData = async () => { + try { + const res = await site_api.priceData(); + if (res.status == 200) { + //debugger; + console.log("PPPP",res.data.pricing); + setPricingData([{ data: res.data.pricing + }]); + return; + } + } catch (error) { + // setIsLoading(false) + } + }; + + useEffect(() => { + getPricingData(); + }, []); + // debugger; + console.log("FFFFF",pricingData); + console.log("AAAAA- ",pricingData[0]); return ( <> @@ -21,88 +46,38 @@ export default function Subscriptions() {
{/* style={{ width: "calc(50% - 15px)" }} */} +{ + +pricingData && +pricingData[0]?.data?.length > 0 && pricingData[0].data.map((price,index)=>( + <> +
+
+ {/* heading */} +
+

+ {price.title} +

+
+
+
+

+ {price.price} +

+
+
+ +
+
+
+
+ + )) +} -
-
- {/* heading */} -
-

- Bits this Month -

-
-
-
-

- 769.44 ETH -

-

- ($949374.94) - - -224.75 (11.5%) - -

-
-
- -
-
-
-
- -
-
- {/* heading */} -
-

- Bits this Month -

-
-
-
-

- 769.44 ETH -

-

- ($949374.94) - - -224.75 (11.5%) - -

-
-
- -
-
-
-
- -
-
- {/* heading */} -
-

- Sell Earing this Month -

-
-
-
-

- 769.44 ETH -

-

- ($949374.94) - - 224.75 (11.5%) - -

-
-
- -
-
-
-
diff --git a/src/components/Tracking/TrackAction/TrackEntryWidget.jsx b/src/components/Tracking/TrackAction/TrackEntryWidget.jsx index fd72522..13b3870 100644 --- a/src/components/Tracking/TrackAction/TrackEntryWidget.jsx +++ b/src/components/Tracking/TrackAction/TrackEntryWidget.jsx @@ -5,10 +5,6 @@ import dataImage2 from "../../../assets/images/data-table-user-2.png"; export default function TrackEntryWidget(props) { - const [eth] = useState(90); - const [btc] = useState(85); - const [ltc] = useState(20); - // debugger; return (
{ try { const res = await api.refreshTrackCategory(); - if(res.status == 200){ + if (res.status == 200) { var fliterCategory = res.data.filter(function (el) { return el.widget == trackpage; }); //debugger; - setSelTrackCat([{data:fliterCategory[0]}]); - return + setSelTrackCat([{ data: fliterCategory[0] }]); + return; } - }catch(error) { - // setIsLoading(false) + } catch (error) { + // setIsLoading(false) } }; @@ -35,7 +34,7 @@ export default function TrackAction() { console.log("TRACK PAGE = = ", trackpage); console.log("SELECTED TRACK PAGE trackCat = = ", selectedCategory); - const selectedEntry = selectedCategory[0]?.data; // better way to do this so thst null on promise will not kill the screen + const selectedEntry = selectedCategory[0]?.data; // better way to do this so thst null on promise will not kill the screen console.log("wait till you know whst page to show"); //debugger; @@ -55,7 +54,21 @@ export default function TrackAction() { {selectedCategory[0]?.data?.title}
-
SOMETHING HERE OBAX
+
+

+

+
+
+ +
+
+

+
diff --git a/src/services/SiteService.js b/src/services/SiteService.js index 339cca5..df499b0 100644 --- a/src/services/SiteService.js +++ b/src/services/SiteService.js @@ -3,7 +3,7 @@ import Axios from "axios"; class SiteService { constructor() { - console.log("Er are here anyway"); + console.log("Site Service Entered"); } // Blog Data {Get} blogData() {