From 34c09440d384a1475f1715056a7d45d423123b40 Mon Sep 17 00:00:00 2001 From: "VICTOR\\anumu" Date: Mon, 16 Jan 2023 16:32:57 +0100 Subject: [PATCH] implemented pricing yearly plan and added FAQs component to all pages rendering it --- src/component/HomeMain/Pricing/Main.js | 110 +++---------------------- src/component/Pages/Faq/Main.js | 78 +++++++----------- src/component/Pricing/Main.js | 6 +- 3 files changed, 45 insertions(+), 149 deletions(-) diff --git a/src/component/HomeMain/Pricing/Main.js b/src/component/HomeMain/Pricing/Main.js index 171b3bf..d69562d 100644 --- a/src/component/HomeMain/Pricing/Main.js +++ b/src/component/HomeMain/Pricing/Main.js @@ -41,7 +41,7 @@ const Main = ({gredient , video}) => { setTog(tog === true ? false : true)}> Yearly - 50% off + {/* 50% off */}
@@ -49,10 +49,9 @@ const Main = ({gredient , video}) => { {prices.length > 0 && prices.map((price, index) => { - if (index % 2 == 0) { return (
-
+
{ video ? image : image }
@@ -62,32 +61,12 @@ const Main = ({gredient , video}) => {
{price.price}
    - {price.features.map((feature, index)=>

    {feature}

    )} + {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 -
-
- ); - } }) } @@ -130,10 +109,9 @@ const Main = ({gredient , video}) => { {prices.length > 0 && prices.map((price, index) => { - if (index % 2 == 0) { return (
-
+
{ video ? image : image }
@@ -141,34 +119,14 @@ const Main = ({gredient , video}) => {

{price.title}

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

    {feature}

    )} + {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 -
-
- ); - } }) } @@ -192,7 +150,7 @@ const Main = ({gredient , video}) => { setTog(tog === true ? false : true)}>
Yearly - 50% off + {/* 50% off */}
@@ -200,10 +158,9 @@ const Main = ({gredient , video}) => { {prices.length > 0 && prices.map((price, index) => { - if (index % 2 == 0) { return (
-
+
{ video ? image : image }
@@ -213,33 +170,13 @@ const Main = ({gredient , video}) => {
{price.price}
    - {price.features.map((feature, index)=>

    {feature}

    )} + {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 -
-
- ); - } - }) + }) }
@@ -250,10 +187,9 @@ const Main = ({gredient , video}) => { {prices.length > 0 && prices.map((price, index) => { - if (index % 2 == 0) { return (
-
+
{ video ? image : image }
@@ -261,34 +197,14 @@ const Main = ({gredient , video}) => {

{price.title}

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

    {feature}

    )} + {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 -
-
- ); - } }) } diff --git a/src/component/Pages/Faq/Main.js b/src/component/Pages/Faq/Main.js index a98e1c8..cbf7bcd 100644 --- a/src/component/Pages/Faq/Main.js +++ b/src/component/Pages/Faq/Main.js @@ -4,24 +4,25 @@ import Bredcrumb from '../../Bredcrumb/Main' 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 Faq from '../../HomeMain/Faq/Main' import SiteService from '../../../vendors/service/siteService' const Main = ({brdcum}) => { - const[activeFaq, setActiveFaq] = useState({btn0 : false}) + // const[activeFaq, setActiveFaq] = useState({btn0 : false}) - const [faqs, setFaqs] = useState([]); // initial state for FAQs before API call + // const [faqs, setFaqs] = useState([]); // initial state for FAQs before API call - let faqServices = new SiteService(); // instantiating the class + // let faqServices = new SiteService(); // instantiating the class - const allFaqData = () => { - return faqServices.faqData(); - }; + // const allFaqData = () => { + // return faqServices.faqData(); + // }; - useEffect(() => { - allFaqData().then((data) => setFaqs(data.data)); - }, []); + // useEffect(() => { + // allFaqData().then((data) => setFaqs(data.data)); + // }, []); return ( <> {brdcum.b1 && @@ -64,12 +65,12 @@ const Main = ({brdcum}) => { bgimg={BGImg2}/>} -
+ {/*
- {/*
+

-
*/} +
- {/*
+

-
*/} +
- {/*
+

-
*/} +
- {/*
+

-
*/} + - {/*
+

-
*/} + - {/*
+

-
*/} + - {/*
+

-
*/} - - {/* 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/component/Pricing/Main.js b/src/component/Pricing/Main.js index cb89c50..940ebfd 100644 --- a/src/component/Pricing/Main.js +++ b/src/component/Pricing/Main.js @@ -1,6 +1,7 @@ import { Link } from 'react-router-dom' import React , {useState ,useEffect} from 'react' import Pricing from '../HomeMain/Pricing/Main' +import Faq from '../HomeMain/Faq/Main' import Bredcrumb from '../Bredcrumb/Main' import BGImg from "../../assets/images/bread_crumb_bg.png" import BGImg1 from "../../assets/images/bread_crumb_bg_one.png" @@ -53,7 +54,8 @@ const Main = ({brdcum}) => { bgimg={BGImg2}/>} -
+ + {/*
@@ -187,7 +189,7 @@ const Main = ({brdcum}) => {
-
+
*/}