From d946417490ea7491e0148ad54a964883ca3f854e Mon Sep 17 00:00:00 2001 From: "VICTOR\\anumu" Date: Thu, 12 Jan 2023 20:53:38 +0100 Subject: [PATCH 1/3] populated FAQs with data from api --- src/component/Pages/Faq/Main.js | 68 ++++++++++++++++++++++++------ src/vendors/service/siteService.js | 4 +- 2 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/component/Pages/Faq/Main.js b/src/component/Pages/Faq/Main.js index a237cfe..1ee4dea 100644 --- a/src/component/Pages/Faq/Main.js +++ b/src/component/Pages/Faq/Main.js @@ -5,9 +5,23 @@ import BGImg from "../../../assets/images/bread_crumb_bg.png" import BGImg1 from "../../../assets/images/bread_crumb_bg_one.png" import BGImg2 from "../../../assets/images/bread_crumb_bg_two.png" +import SiteService from '../../../vendors/service/siteService' + const Main = ({brdcum}) => { const[activeFaq, setActiveFaq] = useState({a : true}) + + const [faqs, setFaqs] = useState([]); // initial state for FAQs before API call + + let faqServices = new SiteService(); // instantiating the class + + const allFaqData = () => { + return faqServices.faqData(); + }; + + useEffect(() => { + allFaqData().then((data) => setFaqs(data.data)); + }, []); return ( <> {brdcum.b1 && @@ -54,7 +68,8 @@ const Main = ({brdcum}) => {
-
+ + {/*

-
-
+
*/} + + {/*

-
+
*/} -
+ {/*

-
+
*/} -
+ {/*

-
+ */} -
+ {/*

-
+ */} -
+ {/*

-
+ */} -
+ {/*

+
*/} + + {/* displays loading ... while the page fetches the FAQs */} + {faqs.length < 1 &&

Loading...

} + + {faqs.length > 0 && faqs.map((faq, index) => { + let id = `heading${index}`; //headingSeven + let target = `collapse${index}`; //#collapseSeven + + return( +
+
+

+ +

+
+ +
+
+

{faq.text}

+
+
+ ) + })} diff --git a/src/vendors/service/siteService.js b/src/vendors/service/siteService.js index dbea9f4..1f359c1 100644 --- a/src/vendors/service/siteService.js +++ b/src/vendors/service/siteService.js @@ -13,7 +13,9 @@ class SiteService { return this.getAuxEnd("/country", null); } - faqData() {} + faqData() { + return this.getAuxEnd("/faq", null); + } //---------------------------------------- ----- //---------------------------------------- ----- From 89fc6adfdd8b2b20c1fdec056ba429cd170c73dd Mon Sep 17 00:00:00 2001 From: ChineseChikki Date: Fri, 13 Jan 2023 01:39:03 +0100 Subject: [PATCH 2/3] updated features details and easy steps text --- src/component/HomeMain/Features/Main.js | 3 +-- src/component/HomeMain/Work/Main.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/component/HomeMain/Features/Main.js b/src/component/HomeMain/Features/Main.js index 81d8b66..ca9d0b9 100644 --- a/src/component/HomeMain/Features/Main.js +++ b/src/component/HomeMain/Features/Main.js @@ -68,8 +68,7 @@ const Main = ({video}) => {

Features that makes app different!

-

Lorem Ipsum is simply dummy text of the printing and typese tting
indus orem Ipsum has beenthe - standard dummy.

+

Fitness Integration with your health plan in your pocket bolsters
healthier life by tracking and experiencing life-changing results.

diff --git a/src/component/HomeMain/Work/Main.js b/src/component/HomeMain/Work/Main.js index 14051b9..732135d 100644 --- a/src/component/HomeMain/Work/Main.js +++ b/src/component/HomeMain/Work/Main.js @@ -20,8 +20,7 @@ const Main = ({dark}) => {

How it works - 3 easy steps

-

Lorem Ipsum is simply dummy text of the printing and typese tting
indus orem Ipsum has beenthe - standard dummy.

+

myFit has powerful connectivity, fitness, health, and safety features,
Also makes provision Fitness tracking,Workout tracking,Heart rate monitoring.

    From ce1879d0a21be5887967334584de9ea0576b08de Mon Sep 17 00:00:00 2001 From: "VICTOR\\anumu" Date: Fri, 13 Jan 2023 15:03:38 +0100 Subject: [PATCH 3/3] Rendered the pricing list from the api call to th pricing_page --- src/component/HomeMain/Pricing/Main.js | 532 +++++++++---------------- src/vendors/service/siteService.js | 4 + 2 files changed, 202 insertions(+), 334 deletions(-) diff --git a/src/component/HomeMain/Pricing/Main.js b/src/component/HomeMain/Pricing/Main.js index fb75738..171b3bf 100644 --- a/src/component/HomeMain/Pricing/Main.js +++ b/src/component/HomeMain/Pricing/Main.js @@ -1,13 +1,30 @@ import { Link } from 'react-router-dom' -import React , { useState} from 'react' +import React , { useState, useEffect} from 'react' +import AOS from "aos"; import img1 from '../../../assets/images/standard.png' import img2 from '../../../assets/images/unlimited.png' import img3 from '../../../assets/images/premium.png' +import SiteService from '../../../vendors/service/siteService' + const Main = ({gredient , video}) => { const[tog, setTog] = useState() + const [prices, setPrices] = useState([]); // initial state for FAQs before API call + + let priceServices = new SiteService(); // instantiating the class + + const getAllPriceData = () => { + return priceServices.priceData(); + }; + + useEffect(() => { + getAllPriceData().then((data) => setPrices(data.data)); + AOS.init(); + AOS.refresh(); + }, []); + return ( <> {gredient ? @@ -29,37 +46,52 @@ const Main = ({gredient , video}) => {
    -
    -
    -
    - image -
    -
    -

    Standard

    - For the basics -
    - $15 -
      -
    • -

      Up to 5 Website

      -
    • -
    • -

      50 GB disk space

      -
    • -
    • -

      10 Customize sub pages

      -
    • -
    • -

      2 Domains access

      -
    • -
    • -

      Support on request

      -
    • -
    - BUY NOW -
    -
    -
    + + {prices.length > 0 && + prices.map((price, index) => { + if (index % 2 == 0) { + return ( +
    +
    +
    + { video ? image : image } +
    +
    +

    {price.title}

    + {price.text} +
    + {price.price} +
      + {price.features.map((feature, index)=>

      {feature}

      )} +
    + Start Now +
    +
    + ); + } else { + return ( +
    +
    +
    + { video ? image : image } +
    +
    +

    {price.title}

    + {price.text} +
    + {price.price} +
      + {price.features.map((feature, index)=>

      {feature}

      )} +
    + Start Now +
    +
    + ); + } + }) + } + + {/*
    image @@ -86,136 +118,60 @@ const Main = ({gredient , video}) => {

    24/7 Customer support

- BUY NOW + Start Now
-
-
-
-
- image -
-
-

Premium

- For small team -
- $55 -
    -
  • -

    Up to 10 Website

    -
  • -
  • -

    100 GB disk space

    -
  • -
  • -

    15 Customize sub pages

    -
  • -
  • -

    4 Domains access

    -
  • -
  • -

    24/7 Customer support

    -
  • -
- BUY NOW -
-
+
*/} +
-
-
-
- image -
-
-

Standard

- For the basics -
- $150 -
    -
  • -

    Up to 10 Website

    -
  • -
  • -

    100 GB disk space

    -
  • -
  • -

    25 Customize sub pages

    -
  • -
  • -

    4 Domains access

    -
  • -
  • -

    Support on request

    -
  • -
- BUY NOW -
-
-
-
-
- image -
-
-

Unlimited

- For the professionals -
- $999 -
    -
  • -

    Unlimited Website

    -
  • -
  • -

    400 GB disk space

    -
  • -
  • -

    40 Customize sub pages

    -
  • -
  • -

    20 Domains access

    -
  • -
  • -

    24/7 Customer support

    -
  • -
- BUY NOW -
-
+ {prices.length > 0 && + prices.map((price, index) => { + if (index % 2 == 0) { + return ( +
+
+
+ { video ? image : image } +
+
+

{price.title}

+ {price.text} +
+ {price.price} +
    + {price.features.map((feature, index)=>

    {feature}

    )} +
+ Start Now +
+
+ ); + } else { + return ( +
+
+
+ { video ? image : image } +
+
+

{price.title}

+ {price.text} +
+ {price.price} +
    + {price.features.map((feature, index)=>

    {feature}

    )} +
+ Start Now +
+
+ ); + } + }) + } -
-
-
- image -
-
-

Premium

- For small team -
- $550 -
    -
  • -

    Up to 20 Website

    -
  • -
  • -

    200 GB disk space

    -
  • -
  • -

    25 Customize sub pages

    -
  • -
  • -

    8 Domains access

    -
  • -
  • -

    24/7 Customer support

    -
  • -
- BUY NOW -
-
@@ -241,193 +197,101 @@ const Main = ({gredient , video}) => {
-
-
-
- { video ? image : image } -
-
-

Standard

- For the basics -
- $15 -
    -
  • -

    Up to 5 Website

    -
  • -
  • -

    50 GB disk space

    -
  • -
  • -

    10 Customize sub pages

    -
  • -
  • -

    2 Domains access

    -
  • -
  • -

    Support on request

    -
  • -
- BUY NOW -
-
-
-
-
- { video ? image : image } -
-
-

Unlimited

- For the professionals -
- $99 -
    -
  • -

    Unlimited Website

    -
  • -
  • -

    200 GB disk space

    -
  • -
  • -

    20 Customize sub pages

    -
  • -
  • -

    10 Domains access

    -
  • -
  • -

    24/7 Customer support

    -
  • -
- BUY NOW -
-
-
-
-
- {video ? image : image } -
-
-

Premium

- For small team -
- $55 -
    -
  • -

    Up to 10 Website

    -
  • -
  • -

    100 GB disk space

    -
  • -
  • -

    15 Customize sub pages

    -
  • -
  • -

    4 Domains access

    -
  • -
  • -

    24/7 Customer support

    -
  • -
- BUY NOW -
-
+ + {prices.length > 0 && + prices.map((price, index) => { + if (index % 2 == 0) { + return ( +
+
+
+ { video ? image : image } +
+
+

{price.title}

+ {price.text} +
+ {price.price} +
    + {price.features.map((feature, index)=>

    {feature}

    )} +
+ Start Now +
+
+ ); + } else { + return ( +
+
+
+ { video ? image : image } +
+
+

{price.title}

+ {price.text} +
+ {price.price} +
    + {price.features.map((feature, index)=>

    {feature}

    )} +
+ Start Now +
+
+ ); + } + }) + } +
-
-
-
- { video ? image : image } -
-
-

Standard

- For the basics -
- $150 -
    -
  • -

    Up to 10 Website

    -
  • -
  • -

    100 GB disk space

    -
  • -
  • -

    25 Customize sub pages

    -
  • -
  • -

    4 Domains access

    -
  • -
  • -

    Support on request

    -
  • -
- BUY NOW -
-
-
-
-
- { video ? image : } -
-
-

Unlimited

- For the professionals -
- $999 -
    -
  • -

    Unlimited Website

    -
  • -
  • -

    400 GB disk space

    -
  • -
  • -

    40 Customize sub pages

    -
  • -
  • -

    20 Domains access

    -
  • -
  • -

    24/7 Customer support

    -
  • -
- BUY NOW -
-
+ {prices.length > 0 && + prices.map((price, index) => { + if (index % 2 == 0) { + return ( +
+
+
+ { video ? image : image } +
+
+

{price.title}

+ {price.text} +
+ {price.price} +
    + {price.features.map((feature, index)=>

    {feature}

    )} +
+ Start Now +
+
+ ); + } else { + return ( +
+
+
+ { video ? image : image } +
+
+

{price.title}

+ {price.text} +
+ {price.price} +
    + {price.features.map((feature, index)=>

    {feature}

    )} +
+ Start Now +
+
+ ); + } + }) + } -
-
-
- {video ? image : image } -
-
-

Premium

- For small team -
- $550 -
    -
  • -

    Up to 20 Website

    -
  • -
  • -

    200 GB disk space

    -
  • -
  • -

    25 Customize sub pages

    -
  • -
  • -

    8 Domains access

    -
  • -
  • -

    24/7 Customer support

    -
  • -
- BUY NOW -
-
diff --git a/src/vendors/service/siteService.js b/src/vendors/service/siteService.js index 1f359c1..438f3f4 100644 --- a/src/vendors/service/siteService.js +++ b/src/vendors/service/siteService.js @@ -16,6 +16,10 @@ class SiteService { faqData() { return this.getAuxEnd("/faq", null); } + + priceData() { + return this.getAuxEnd("/pricing", null); + } //---------------------------------------- ----- //---------------------------------------- -----