From 362324925be36fd3e34d8fb50df68ddc9c1e66ea Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Fri, 20 Jan 2023 16:17:13 +0100 Subject: [PATCH 1/7] Worked on the blog single page --- .env | 8 +- src/assets/css/style.css | 132 +++++--- src/component/Blog/Blog/Main.js | 203 +++++++----- src/component/Blog/BlogSingle/Main.js | 456 +++++++++++--------------- src/routes/index.js | 2 +- 5 files changed, 414 insertions(+), 387 deletions(-) diff --git a/.env b/.env index 77a487b..1f305c2 100644 --- a/.env +++ b/.env @@ -5,12 +5,16 @@ REACT_APP_YEAR=2023 REACT_APP_ANDROID_URL="https://play.google.com/store/apps/details?id=com.mermsemr.myfit" REACT_APP_IOS_URL="https://play.google.com/store/apps/details?id=com.mermsemr.myfit" -REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246" -REACT_APP_TWITTER="https://twitter.com/fluxtra" REACT_APP_APPSITE=" https://myfitapp.mermsemr.com" #REACT_APP_APPSITE="http://localhost:7012" +# Social Media Links +REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246" +REACT_APP_TWITTER="https://twitter.com/fluxtra" +REACT_APP_INSTAGRAM="" +REACT_APP_PINTEREST="" + REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit" REACT_APP_FORM_TIMEOUT = 10000 diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 1b8caf4..797b3ac 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -3010,9 +3010,12 @@ header.fix_style.white_header { .blog_detail_section .blog_inner_pannel .review span { line-height: 1; + color: var(--purple); + display: inline-block; + font-weight: 700; } -.blog_detail_section .blog_inner_pannel .review span:first-child { +/* .blog_detail_section .blog_inner_pannel .review span:first-child { color: var(--purple); display: inline-block; font-weight: 700; @@ -3024,7 +3027,7 @@ header.fix_style.white_header { margin-left: 15px; padding-left: 15px; border-left: 1px solid var(--dark-purple); -} +} */ .blog_detail_section .blog_inner_pannel .section_title { margin-bottom: 40px; @@ -3043,29 +3046,29 @@ header.fix_style.white_header { } .blog_detail_section .blog_inner_pannel .info h3 { - font-weight: 700; - color: var(--dark-purple); - margin-top: 30px; - font-size: 25px; - margin-bottom: 15px; + font-weight: 700; + color: var(--dark-purple); + margin-top: 30px; + font-size: 25px; + margin-bottom: 15px; } /* To highlight the link in the terms section */ -.blog_detail_section .blog_inner_pannel .info p span a{ - color: var(--dark-purple); - text-decoration: underline; +.blog_detail_section .blog_inner_pannel .info p span a { + color: var(--dark-purple); + text-decoration: underline; } /* To reduce the fonts for sub-headers */ .blog_detail_section .blog_inner_pannel .info h4 { - font-weight: 700; - color: var(--dark-purple); - margin-top: 30px; - font-size: 20px; - margin-bottom: 15px; - } + font-weight: 700; + color: var(--dark-purple); + margin-top: 30px; + font-size: 20px; + margin-bottom: 15px; +} - /* To align the text for proper readability */ +/* To align the text for proper readability */ .blog_detail_section .blog_inner_pannel .info p { text-align: justify; } @@ -3526,39 +3529,71 @@ header.fix_style.white_header { } /* Textarea scrollbar */ -.contact_page_section .contact_inner .contact_form form .form-group textarea::-webkit-scrollbar { +.contact_page_section + .contact_inner + .contact_form + form + .form-group + textarea::-webkit-scrollbar { width: 12px; cursor: pointer; } -.contact_page_section .contact_inner .contact_form form .form-group textarea::-webkit-scrollbar-track { - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); +.contact_page_section + .contact_inner + .contact_form + form + .form-group + textarea::-webkit-scrollbar-track { + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); border-radius: 10px; background-color: var(--light-bg); } -.contact_page_section .contact_inner .contact_form form .form-group textarea::-webkit-scrollbar-thumb { +.contact_page_section + .contact_inner + .contact_form + form + .form-group + textarea::-webkit-scrollbar-thumb { border-radius: 10px; - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); background-color: var(--body-text-purple); } -.contact_page_section .contact_inner .contact_form form .form-group .contact_btn{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + .contact_btn { display: flex !important; align-items: center; justify-content: center; } -.contact_page_section .contact_inner .contact_form form .form-group .contact_btn p{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + .contact_btn + p { margin: 0 !important; } -.contact_page_section .contact_inner .contact_form form .form-group .contact_btn > span{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + .contact_btn + > span { width: 24px; height: 24px; } -#contact_body{ +#contact_body { min-height: 48rem; display: flex; flex-direction: column; @@ -3567,7 +3602,7 @@ header.fix_style.white_header { gap: 10px; } -.contact_body{ +.contact_body { display: flex; flex-direction: column; align-content: center; @@ -3598,28 +3633,44 @@ header.fix_style.white_header { } /* For the err msg */ -#errText{ +#errText { text-align: center; color: tomato; font-weight: 600; } -.contact_page_section .contact_inner .contact_form form .form-group span{ +.contact_page_section .contact_inner .contact_form form .form-group span { font-size: 12px; color: tomato; padding: 3px; display: none; } -.contact_page_section .contact_inner .contact_form form .form-group input:valid[focused="true"]{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + input:valid[focused="true"] { border: 1px solid var(--dark-purple); } -.contact_page_section .contact_inner .contact_form form .form-group input:invalid[focused="true"]{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + input:invalid[focused="true"] { border: 1px solid tomato; } -.contact_page_section .contact_inner .contact_form form .form-group input:invalid[focused="true"] ~ span{ +.contact_page_section + .contact_inner + .contact_form + form + .form-group + input:invalid[focused="true"] + ~ span { display: block; } @@ -4689,19 +4740,20 @@ header.fix_style.white_header { /* Loader */ -.loader{ +.loader { border-radius: 100%; position: relative; } -.loader-sm{ +.loader-sm { width: 24px; height: 24px; } /* LOADER 1 */ -#loader-1:before, #loader-1:after{ +#loader-1:before, +#loader-1:after { content: ""; position: absolute; width: 100%; @@ -4711,24 +4763,24 @@ header.fix_style.white_header { border-top-color: var(--body-text-purple); } -#loader-1:before{ +#loader-1:before { z-index: 100; animation: spin 1.5s infinite; } -#loader-1:after{ +#loader-1:after { border: 3.5px solid #ccc; } -@keyframes spin{ - 0%{ +@keyframes spin { + 0% { -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); -o-transform: rotate(0deg); transform: rotate(0deg); } - 100%{ + 100% { -webkit-transform: rotate(360deg); -ms-transform: rotate(360deg); -o-transform: rotate(360deg); diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index 36d7625..b2e1e87 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -1,46 +1,72 @@ +/** @format */ + 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(); + let api = new SiteService(); useEffect(() => { getBlogData(); }, []); const getBlogData = async () => { - try { - const res = await api.blogData(); + // Saving it locally to avoid interfering with server + if (localStorage.getItem("myFit--blogData") == null) { + try { + let res = await api.blogData(); - setBlogData(res.data); - - console.log(res.data); - - - } catch (error) { - console.log("Error from blog data ", error); + // Set the blog data to local storage + localStorage.setItem("myFit--blogData", JSON.stringify(res.data)); + setBlogData(res.data); + // Set a time out for the blog data to be deleted from local storage + setTimeout(() => { + localStorage.removeItem("myFit--blogData"); + }, 3600); + } catch (error) { + console.log("Error from blog data ", error); + } + } else { + try { + let data = JSON.parse(localStorage.getItem("myFit--blogData")); + setBlogData(data); + } catch (error) { + console.error("Error parsing JSON data: ", error); + } } }; - + return ( <> -
+
{" "} - image{" "} + image{" "} {" "} - image{" "} + image{" "} {" "} - image{" "} + image{" "}
@@ -53,93 +79,118 @@ const Main = ({ brdcum, bgimg }) => { ยป
  • - Blog + + {blogData.map((item, idx) => { + if (idx === 0) { + return {item.post_title}; + } + })} +
  • - {/*
    -
    -
    - - -
    -
    -
    */}
    - {blogData.map((data,index) => { - if (index == 0){ + {blogData.map((data, index) => { + console.log(data) + if (index == 0) { return ( -
    -
    -
    -
    - image - {/* 20 min ago */} - - {new Date (data.post_date).toDateString()} +
    +
    +
    +
    + image + + {new Date(data.post_date).toDateString()} +
    -
    -
    -
    -
    -

    {data.post_title}

    -
    - +
    +
    +
    +

    {data.post_title}

    +
    + {/* Change the route name */} + READ MORE +
    -
    - - ) - } + ); + } })} - -
    -
    + +
    {blogData.map((data, index) => { - if (index > 0){ + if (index > 0) { return ( -
    -
    -
    - image - {new Date (data && data.post_date).toDateString()} +
    +
    +
    + image + + {new Date(data && data.post_date).toDateString()} + +
    +
    +

    {data.post_title}

    +
    + {/* Change the route name */} + + READ MORE + +
    +
    -
    -

    {data.post_title}

    -
    - - READ MORE - -
    -
    -
    - - )} - - - })} + ); + } + })}
    +
    • - + {" "} Visit our blog diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 08a0686..f881a88 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -1,288 +1,208 @@ +/** @format */ + import React, { useEffect, useState } from "react"; -import { Link, useLocation } 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 { Link, useLocation } 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 { useParams } from "react-router-dom"; +import SiteService from "../../../vendors/service/siteService"; -const Main = ({brdcum}) => { +const Main = ({ brdcum }) => { + const { id } = useParams(); + const location = useLocation(); + let data = location.state?.data; + const [blogData, setBlogData] = useState([]); + + let api_call = new SiteService(); + useEffect(() => { + getBlogData(); + }, [blogData]); + + const getBlogData = async () => { + // Saving it locally to avoid interfering with server + if (localStorage.getItem("myFit--blogData") == null) { + try { + let res = await api_call.blogData(); + + // Set the blog data to local storage + localStorage.setItem("myFit--blogData", JSON.stringify(res.data)); + setBlogData(res.data); + // Set a time out for the blog data to be deleted from local storage + setTimeout(() => { + localStorage.removeItem("myFit--blogData"); + }, 3600); + } catch (error) { + console.log("Error from blog data ", error); + } + } else { + try { + let data = JSON.parse(localStorage.getItem("myFit--blogData")); + setBlogData(data); + } catch (error) { + console.error("Error parsing JSON data: ", error); + } + } + }; + + console.log("location", location, data); - const { id } = useParams(); - const location = useLocation(); - const data = location.state?.data; - - console.log("location", location, data); - 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 */} - {new Date (data && data.post_modified).toDateString()} - -
      -
      -

      {data && data.post_title}

      -
      -
      - image -
      -
      -

      {data && data.post_name}

      -
      -
      - {/*
      -

      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 -
      */} -
      -

      {data && data.post_author}

      - {new Date (data && data.post_date).toDateString()} -
      -
      -
      -
        -
      • -
      • -
      • -
      • -
      -
      -
      -
      -
        -
      • Tags:

      • -
      • app,
      • -
      • rating,
      • -
      • development
      • -
      -
      -
      +
      +
      +
      +
      + {new Date(data && data.post_modified).toDateString()}
      -
      -
      -
      -
      -

      3 Comments

      +
      +

      {data && data.post_title}

      +
      +
      + image +
      +
      +

      {data && data.post_name}

      +
      +
      + +
      +
      +
      + {/*

      {data && data.post_author}

      */} + {new Date(data && data.post_date).toDateString()}
      +
      +
        -
      • -
        -
        - 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 *

    +
    +
    + {/* Latest Title */} +
    +

    + Read latest story +


    +
    + {/* Body */} +
    + {blogData.slice(-4, -1).map((item, index) => ( +
    +
    +
    + image + {new Date(item.post_date).toDateString()} +
    +
    +

    {item.post_title}

    +
    + READ MORE +
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    -
    -

    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 \ No newline at end of file +export default Main; diff --git a/src/routes/index.js b/src/routes/index.js index af34beb..8aee054 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -84,7 +84,7 @@ const Routing = () => { } /> } /> } /> - } /> + } /> } /> } /> From e866662f4d7a7d6d5c1b36ba584beb8b7c4f34aa Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Fri, 20 Jan 2023 16:51:53 +0100 Subject: [PATCH 2/7] addition to this --- src/component/Blog/Blog/Main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index 5efc2a5..0a860ad 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -17,6 +17,10 @@ const Main = ({ brdcum, bgimg }) => { }, []); const getBlogData = async () => { + /* + The reason for this, is because of the breaking I had when building the blog + I decided to save to the local storage for an hour so that it won't need to be going to the server again but I can change this + */ // Saving it locally to avoid interfering with server if (localStorage.getItem("myFit--blogData") == null) { try { @@ -95,7 +99,7 @@ const Main = ({ brdcum, bgimg }) => {
    {blogData.map((data, index) => { - console.log(data) + console.log(data); if (index == 0) { return (
    Date: Fri, 20 Jan 2023 17:26:37 +0100 Subject: [PATCH 3/7] fixed a stubborn span --- src/assets/css/style.css | 7 +++++-- src/component/Blog/BlogSingle/Main.js | 5 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 797b3ac..bea1a8b 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -3008,11 +3008,14 @@ header.fix_style.white_header { margin-bottom: 15px; } -.blog_detail_section .blog_inner_pannel .review span { +.blog_detail_section .blog_inner_pannel span.blog_date { line-height: 1; color: var(--purple); - display: inline-block; + display: flex; font-weight: 700; + text-align: center; + justify-content: center; + align-items: center; } /* .blog_detail_section .blog_inner_pannel .review span:first-child { diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 1497a4b..574d41f 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -101,9 +101,8 @@ const Main = ({ brdcum }) => {
    -
    - {new Date(data && data.post_modified).toDateString()} -
    + {new Date(data && data.post_modified).toDateString()} +

    {data && data.post_title}

    From e68246c86c83eac35bb6033400ca6f63c136187d Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Fri, 20 Jan 2023 17:31:06 +0100 Subject: [PATCH 4/7] removing the unnecessary console logs --- src/component/Blog/Blog/Main.js | 1 - src/component/Blog/BlogSingle/Main.js | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index 0a860ad..fedc6e6 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -9,7 +9,6 @@ import SiteService from "../../../vendors/service/siteService"; const Main = ({ brdcum, bgimg }) => { const [blogData, setBlogData] = useState([]); - console.log(blogData); let api = new SiteService(); useEffect(() => { diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 574d41f..96eb127 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -6,11 +6,9 @@ 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 { useParams } from "react-router-dom"; import SiteService from "../../../vendors/service/siteService"; const Main = ({ brdcum }) => { - const { id } = useParams(); const location = useLocation(); let data = location.state?.data; const [blogData, setBlogData] = useState([]); @@ -50,8 +48,6 @@ const Main = ({ brdcum }) => { } }; - console.log("location", location, data); - return ( <> {brdcum.b1 && ( From 11ef4d7442f8c6cbf38fa6d9ed6233762394f755 Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Fri, 20 Jan 2023 17:35:38 +0100 Subject: [PATCH 5/7] added link --- src/component/Blog/BlogSingle/Main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 96eb127..685f3bf 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -192,7 +192,7 @@ const Main = ({ brdcum }) => { dangerouslySetInnerHTML={{ __html: item.post_content.substring(0, 100) + " . . .", }}>
    - READ MORE + READ MORE
    From 3ea82b41cfcd1b5b483cc6c340f4fd0a432fa82c Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Fri, 20 Jan 2023 18:29:47 +0100 Subject: [PATCH 6/7] remove console logs and added loader --- src/component/Blog/Blog/Main.js | 10 ++++++---- src/component/Contact/Main.js | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index fedc6e6..43a4623 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -3,8 +3,6 @@ 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 }) => { @@ -97,8 +95,12 @@ const Main = ({ brdcum, bgimg }) => {
    + {blogData.length < 1 && ( +
    + )} {blogData.map((data, index) => { - console.log(data); if (index == 0) { return (
    {
    • {" "} Visit our blog diff --git a/src/component/Contact/Main.js b/src/component/Contact/Main.js index 5ab1a9f..bc16627 100644 --- a/src/component/Contact/Main.js +++ b/src/component/Contact/Main.js @@ -78,7 +78,6 @@ const Main = ({ brdcum }) => { const onChange = (e) => { setValues((prev) => ({ ...prev, [e.target.name]: e.target.value })); }; - console.log(values); // Submitting form const handleSubmit = async (e) => { @@ -121,7 +120,7 @@ const Main = ({ brdcum }) => { }, []); useEffect(() => { - console.log(myData); + myData }, [myData]); return ( From c497556866d6aca5635166b9472cc056acd51cd0 Mon Sep 17 00:00:00 2001 From: Chukwumdiebube Date: Fri, 20 Jan 2023 19:22:22 +0100 Subject: [PATCH 7/7] removed links --- .env | 2 -- src/component/Blog/BlogSingle/Main.js | 19 ++++++------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.env b/.env index 6e4162a..56afd7f 100644 --- a/.env +++ b/.env @@ -12,8 +12,6 @@ REACT_APP_APPSITE=" https://myfitapp.mermsemr.com" # Social Media Links REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246" REACT_APP_TWITTER="https://twitter.com/fluxtra" -REACT_APP_INSTAGRAM="" -REACT_APP_PINTEREST="" REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit" diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 685f3bf..0d1503f 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -97,8 +97,10 @@ const Main = ({ brdcum }) => {
      - {new Date(data && data.post_modified).toDateString()} - + + {new Date(data && data.post_modified).toDateString()} + +

      {data && data.post_title}

      @@ -135,16 +137,6 @@ const Main = ({ brdcum }) => {
    • -
    • - - - -
    • -
    • - - - -
    @@ -167,7 +159,8 @@ const Main = ({ brdcum }) => { data-aos-delay="100">

    Read latest story -


    + +
    {/* Body */}