diff --git a/public/index.html b/public/index.html index b2a6f6b..47c1de9 100644 --- a/public/index.html +++ b/public/index.html @@ -36,6 +36,6 @@ - + diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index 44f4340..887cb45 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -6,6 +6,7 @@ import BGImg2 from "../../../assets/images/bread_crumb_bg_two.png"; import SiteService from "../../../vendors/service/siteService"; const Main = ({ brdcum, bgimg }) => { + const [firstBlog, setFirstBlog] = useState([]); const [blogData, setBlogData] = useState([]); const api = new SiteService(); @@ -16,15 +17,18 @@ const Main = ({ brdcum, bgimg }) => { const getBlogData = async () => { try { const res = await api.blogData(); + let firstBlogData = res.data.shift(); setBlogData(res.data); - console.log("data", res.data); - console.log("Blog details ", res); - console.log('main blog') + setFirstBlog([firstBlogData]); + console.log(firstBlogData); + console.log(res.data); + + } catch (error) { console.log("Error from blog data ", error); } }; - + return ( <>
@@ -68,6 +72,7 @@ const Main = ({ brdcum, bgimg }) => {
+ {firstBlog.length > 0 &&
{ data-aos-duration="1500" >
- image - 20 min ago + {/* 20 min ago */} + + {new Date (firstBlog[0].post_date).toDateString()}
-

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 +

{firstBlog[0].post_title}

+
+ + READ MORE +
+ }
@@ -110,11 +113,11 @@ const Main = ({ brdcum, bgimg }) => {
image - {data.post_date} + {new Date (data && data.post_date).toDateString()}

{data.post_title}

-

+
READ MORE diff --git a/src/component/Blog/BlogSingle/Index.js b/src/component/Blog/BlogSingle/Index.js deleted file mode 100644 index 0b514c5..0000000 --- a/src/component/Blog/BlogSingle/Index.js +++ /dev/null @@ -1,7 +0,0 @@ -const Main = ({ brdcum }) => { -console.log('something else'); - - -}; - -export default Main; diff --git a/src/component/Blog/BlogSingle/Main copy.js b/src/component/Blog/BlogSingle/Main copy.js deleted file mode 100644 index 76ca801..0000000 --- a/src/component/Blog/BlogSingle/Main copy.js +++ /dev/null @@ -1,513 +0,0 @@ -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); - } - }; - - return ( - <> - {brdcum.b1 && ( - - )} - - {brdcum.b2 && ( - - )} - - {brdcum.b5 && ( - - )} - - {brdcum.b3 && } - - {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 -
  • -
-
-
-
-
-
-
-
-

3 Comments

-
-
    -
  • -
    -
    - 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.{" "} -

    -
    -
  • -
-
-
- -
-
-
-

- 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. -

-
-
-
-
-
- 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 -
-
-
-
-
-
- - ); -}; - -export default Main; diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 96d97d7..78b7993 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -4,39 +4,16 @@ 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 location = useLocation(); const data = location.state?.data; - console.log("location", location, data); - - // const api = new SiteService(); - - // const getBlogData = async () => { - // try { - // const res = await api.blogData(); - // setBlogData(res.data); - // console.log("data", res.data); - // console.log("Blog details ", res); - // console.log("good"); - - // } catch (error) { - // console.log("Error from blog data ", error); - // } - // }; - - // useEffect(() => { - // getBlogData(); - // }, []); - - + return ( <> @@ -79,7 +56,8 @@ const Main = ({brdcum}) => {
Review - {data && data.post_modified} + {new Date (data && data.post_modified).toDateString()} +

{data && data.post_title}

@@ -88,20 +66,20 @@ const Main = ({brdcum}) => { image
-

{data && data.post_title}

-

{data && data.post_content}

- +

{data && data.post_name}

+
+
-
- image + {/* image */}
-

{data && data.post_author}

- {data && data.post_date} + {/*

{data && data.post_author}

*/} + {new Date (data && data.post_date).toDateString()} +
@@ -113,70 +91,11 @@ const Main = ({brdcum}) => {
-
-
    -
  • Tags:

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

3 Comments

-
- -
-
+