diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index 2ee2880..b5f327c 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -1,27 +1,60 @@ -import React from 'react' -import { Link } from 'react-router-dom' -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 React, { useEffect, useState } from "react"; +import { Link } from "react-router-dom"; +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, bgimg }) => { + const [blogData, setBlogData] = useState([]); + + const api = new SiteService(); + useEffect(() => { + getBlogData(); + }, []); + + const getBlogData = async () => { + try { + const res = await api.blogData(); + setBlogData(res.data); + console.log("data", res.data); + console.log("Blog details ", res); + } catch (error) { + console.log("Error from blog data ", error); + } + }; -const Main = ({brdcum,bgimg}) => { return ( <> - -
-
- image - image - image +
+
+ + {" "} + image{" "} + + + {" "} + image{" "} + + + {" "} + image{" "} + -
-

Latest Blog Post

-
    -
  • Home
  • -
  • »
  • -
  • Blog
  • -
- {/*
+
+

Latest Blog Post

+
    +
  • + Home +
  • +
  • + » +
  • +
  • + Blog +
  • +
+ {/*
@@ -29,126 +62,81 @@ const Main = ({brdcum,bgimg}) => {
*/} -
-
+
+
- -
-
-
-
-
- image - 20 min ago -
-
-
-
-
-

Top rated app of the year!

-

myFit has powerful connectivity, fitness, health, and safety features - Also makes provision Fitness tracking,Workout tracking,Heart rate monitoringscrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesetting.

- READ MORE -
-
-
-
+
+
+
+
+
+ image + 20 min ago +
-
-
-
-
-
-
-
- image - 45 min ago -
-
-

Cool features added!

-

Lorem Ipsum is simply dummy text of the printing and typesetting - industry lorem Ipsum has.

- READ MORE -
-
-
-
-
-
- image - 45 min ago -
-
-

Top rated app! Yupp.

-

Simply dummy text of the printing and typesetting industry lorem Ipsum has Lorem Ipsum is.

- READ MORE -
-
-
-
-
-
- image - 45 min ago -
-
-

Creative ideas on app.

-

Printing and typesetting industry lorem Ipsum has Lorem simply dummy text of the.

- READ MORE -
-
-
-
-
-
- image - 45 min ago -
-
-

Excellence UI design

-

Lorem Ipsum is simply dummy text of the printing and typesetting - industry lorem Ipsum has.

- READ MORE -
-
-
-
-
-
- image - 45 min ago -
-
-

Quick and easy Search

-

Simply dummy text of the printing and typesetting industry lorem Ipsum has Lorem Ipsum is.

- READ MORE -
-
-
-
-
-
- image - 45 min ago -
-
-

Chat function eded

-

Printing and typesetting industry lorem Ipsum has Lorem simply dummy text of the.

- READ MORE -
-
-
-
-
-
    -
  • Visit our blog
  • -
+
+
+
+

Top rated app of the year!

+

+ myFit has powerful connectivity, fitness, health, and safety + features Also makes provision Fitness tracking,Workout + tracking,Heart rate monitoringscrambled it to make a type + specimen book. It has survived not only five centuries, but + also the leap into electronic Lorem Ipsum is simply dummy + text of the printing and typesetting. +

+ READ MORE
+
-
+
+
+ +
+
+
+ {blogData.map((data) => ( +
+
+
+ image + {data.post_date} +
+
+

{data.post_title}

+

{data.post_content}

+ {/*

*/} + + READ MORE + +
+
+
+ ))} +
+
+
    +
  • + + {" "} + Visit our blog + +
  • +
+
+
+
- ) -} + ); +}; -export default Main \ No newline at end of file +export default Main; diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 3ff6fd5..76ca801 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -1,275 +1,513 @@ -import React from 'react' -import { Link } from 'react-router-dom' -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 React, { useEffect, useState } from "react"; +import { Link } from "react-router-dom"; +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 SiteService from "../../../vendors/service/siteService"; +import { useParams } from "react-router-dom"; + +const Main = ({ brdcum }) => { + const [blogData, setBlogData] = useState([]); + const { id } = useParams(); + + const api = new SiteService(); + useEffect(() => { + getBlogData(); + }, []); + + const getBlogData = async () => { + try { + const res = await api.blogData(id); + setBlogData(res.data); + console.log("data", res.data); + console.log("Blog details ", res); + } catch (error) { + console.log("Error from blog data ", error); + } + }; -const Main = ({brdcum}) => { - return ( <> - - {brdcum.b1 && - } + {brdcum.b1 && ( + + )} - {brdcum.b2 && - } + {brdcum.b2 && ( + + )} - {brdcum.b5 && - } + {brdcum.b5 && ( + + )} - {brdcum.b3 && - } + {brdcum.b3 && } - {brdcum.b4 && - } + {brdcum.b4 && ( + + )} -
-
-
-
- Review - 45 min ago -
-
-

Top rated app of the year!

-
-
- image -
-
-

Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived.

-

Printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unnown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys centuries, but also the leap into electronic.

-

Why we are best

-

Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic.

-
    -
  • Lorem Ipsum is simply dummy text of the printing and typesetting in

  • -
  • Dustry lorem Ipsum has been the industrys standard dummy text ev er since the when

  • -
  • Unknown printer took a galley of type and scrambled it to make.

  • -
  • Type specimen book. It has survived not only five centuries, but also the leap into electronic.

  • -
  • Lorem Ipsum is simply dummy text of the printing.

  • -
  • Dustry lorem Ipsum has been the industrys standard dummy text ev er since.

  • -
  • Unknown printer took a galley of type and scrambled it to make.

  • -
  • Type specimen book. It has survived not only.

  • -
-
-
-
-
- image -
-
- image -
-
-
-
-

Why we are best

-

Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived.

-
-
- image -

Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy.

-

Mr. John Doe, Apper Inc

-
-

Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic industry.

-
-
-
- image -
-
-

By: John Dow

- July 25, 2022 -
-
-
-
    -
  • -
  • -
  • -
  • -
-
-
-
-
    -
  • Tags:

  • -
  • app,
  • -
  • rating,
  • -
  • development
  • -
-
-
+
+
+
+
+ Review + 45 min ago
-
-
-
-
-

3 Comments

+
+

Top rated app of the year!

+
+
+ image +
+
+

+ Lorem Ipsum is simply dummy text of the printing and typesetting + in dustry lorem Ipsum has been the industrys standard dummy text + ev er since the 1500s, when an unknown printer took a galley of + type and scrambled it to make a type specimen book. It has + survived not only five centuries, but also the leap into + electronic Lorem Ipsum is simply dummy text of the printing and + typesettingindustry lorem Ipsum has been the industrys standard + dummy text ever since the 1500s, when an unknown printer took a + galley of type and scrambled it to make a type specimen book. It + has survived. +

+

+ Printing and typesetting in dustry lorem Ipsum has been the + industrys standard dummy text ev er since the 1500s, when an + unnown printer took a galley of type and scrambled it to make a + type specimen book. It has survived not only five centuries, but + also the leap into electronic Lorem Ipsum is simply dummy text + of the printing and typesettingindustry lorem Ipsum has been the + industrys centuries, but also the leap into electronic. +

+

Why we are best

+

+ Lorem Ipsum is simply dummy text of the printing and typesetting + in dustry lorem Ipsum has been the industrys standard dummy text + ev er since the 1500s, when an unknown printer took a galley of + type and scrambled it to make a type specimen book. It has + survived not only five centuries, but also the leap into + electronic. +

+
    +
  • +

    + {" "} + + + {" "} + Lorem Ipsum is simply dummy text of the printing and + typesetting in{" "} +

    +
  • +
  • +

    + {" "} + + + {" "} + Dustry lorem Ipsum has been the industrys standard dummy + text ev er since the when +

    +
  • +
  • +

    + {" "} + + + {" "} + Unknown printer took a galley of type and scrambled it to + make. +

    +
  • +
  • +

    + {" "} + + + {" "} + Type specimen book. It has survived not only five centuries, + but also the leap into electronic. +

    +
  • +
  • +

    + {" "} + + + {" "} + Lorem Ipsum is simply dummy text of the printing. +

    +
  • +
  • +

    + {" "} + + + {" "} + Dustry lorem Ipsum has been the industrys standard dummy + text ev er since. +

    +
  • +
  • +

    + {" "} + + + {" "} + Unknown printer took a galley of type and scrambled it to + make. +

    +
  • +
  • +

    + {" "} + + + {" "} + Type specimen book. It has survived not only. +

    +
  • +
+
+
+
+
+ image
+
+ image +
+
+
+
+

Why we are best

+

+ Lorem Ipsum is simply dummy text of the printing and typesetting + in dustry lorem Ipsum has been the industrys standard dummy text + ev er since the 1500s, when an unknown printer took a galley of + type and scrambled it to make a type specimen book. It has + survived not only five centuries, but also the leap into + electronic Lorem Ipsum is simply dummy text of the printing and + typesettingindustry lorem Ipsum has been the industrys standard + dummy text ever since the 1500s, when an unknown printer took a + galley of type and scrambled it to make a type specimen book. It + has survived. +

+
+
+ + image + +

+ Lorem Ipsum is simply dummy text of the printing and typesetting + in dustry lorem Ipsum has been the industrys standard dummy. +

+

+ Mr. John Doe, Apper Inc +

+
+

+ Lorem Ipsum is simply dummy text of the printing and typesetting + in dustry lorem Ipsum has been the industrys standard dummy text + ev er since the 1500s, when an unknown printer took a galley of + type and scrambled it to make a type specimen book. It has + survived not only five centuries, but also the leap into + electronic industry. +

+
+
+
+ image +
+
+

By: John Dow

+ July 25, 2022 +
+
+
    -
  • -
    -
    - image -
    -
    - 30 min ago -

    Dolly Shell

    -
    -
    -
    -

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the in - dustrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.

    -
    -
  • -
  • -
    -
    - image -
    -
    - 15 min ago -

    Devil Joe

    -
    -
    -
    -

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the when.

    -
    -
  • -
  • -
    -
    - image -
    -
    - 2 days ago -

    Sherly Shie

    -
    -
    -
    -

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the in - dustrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen.

    -
    -
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
+
-
+
+
    +
  • +

    Tags:

    +
  • +
  • + app, +
  • +
  • + rating, +
  • +
  • + development +
  • +
+
+
+
+ +
+
+
+

3 Comments

+
+ +
+
-
-
-
-

Leave a comment

-

Your email address will not be published. Required fields are marked *

+
+
+
+

+ Leave a comment +

+

+ Your email address will not be published. Required fields are + marked * +

+
+
+
+
+
+
- -
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
- -
-
- +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
-
+ +
+
-
-
-
-

Read latest story

-

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

+
+
+
+

+ Read latest story +

+

+ Lorem Ipsum is simply dummy text of the printing and typese tting{" "} +
indus orem Ipsum has beenthe standard dummy. +

+
+
+
+
+
+ image + 45 min ago
-
-
-
-
- image - 45 min ago -
-
-

Cool features added!

-

Lorem Ipsum is simply dummy text of the printing and typesetting - industry lorem Ipsum has.

- READ MORE -
-
-
-
-
-
- image - 45 min ago -
-
-

Top rated app! Yupp.

-

Simply dummy text of the printing and typesetting industry lorem Ipsum has Lorem Ipsum is.

- READ MORE -
-
-
-
-
-
- image - 45 min ago -
-
-

Creative ideas on app.

-

Printing and typesetting industry lorem Ipsum has Lorem simply dummy text of the.

- READ MORE -
-
-
+
+

Cool features added!

+

+ Lorem Ipsum is simply dummy text of the printing and + typesetting industry lorem Ipsum has. +

+ READ MORE
+
-
+
+
+
+ image + 45 min ago +
+
+

Top rated app! Yupp.

+

+ Simply dummy text of the printing and typesetting industry + lorem Ipsum has Lorem Ipsum is. +

+ READ MORE +
+
+
+
+
+
+ image + 45 min ago +
+
+

Creative ideas on app.

+

+ Printing and typesetting industry lorem Ipsum has Lorem + simply dummy text of the. +

+ READ MORE +
+
+
+
+
+
- ) -} + ); +}; -export default Main \ No newline at end of file +export default Main; diff --git a/src/routes/index.js b/src/routes/index.js index faae420..2e2edb3 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -84,7 +84,10 @@ const Routing = () => { } /> } /> } /> - } /> + } + /> } /> } /> diff --git a/src/vendors/service/siteService.js b/src/vendors/service/siteService.js index 7b56d62..e4bdd82 100644 --- a/src/vendors/service/siteService.js +++ b/src/vendors/service/siteService.js @@ -5,25 +5,25 @@ class SiteService { constructor() { console.log("Er are here anyway"); } - blogData() { - return this.getAuxEnd("blogdata", null); + blogData(id = "") { + return this.getAuxEnd(`/blogdata${id ? "/" + id : ""}`, null); } countryData() {} faqData() {} - + //---------------------------------------- ----- //---------------------------------------- ----- - // Unified call below + // Unified call below //---------------------------------------- ----- //---------------------------------------- ----- getAuxEnd(uri, reqData) { const endPoint = process.env.REACT_APP_AUX_ENDPOINT + uri; - Axios.get(endPoint) + return Axios.get(endPoint) .then((response) => { - console.log(response); - res = response; + // console.log(response); + // res = response; console.log("~~~~~~~ Toks2 GET ~~~~~~~~"); return response; }) @@ -41,7 +41,7 @@ class SiteService { }); } - getAuxEnd(uri, reqData) { + postAuxEnd(uri, reqData) { const endPoint = process.env.REACT_APP_AUX_ENDPOINT + uri; Axios.post(endPoint) .then((response) => {