Compare commits

..

11 Commits

9 changed files with 94 additions and 47 deletions
-1
View File
@@ -16,4 +16,3 @@ REACT_APP_AUX_ENDPOINT = "https://devapi.mermsemr.com/en/desktop/api/v2/myfit"
REACT_APP_FORM_TIMEOUT = 10000
REACT_APP_MAX_MESSAGE_LENGHT =300
REACT_APP_BLOGSITE="https://blog.mermsemr.com/"
+3 -2
View File
@@ -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 [blogData, setBlogData] = useState([]);
console.log(blogData);
const api = new SiteService();
useEffect(() => {
@@ -18,7 +19,7 @@ const Main = ({ brdcum, bgimg }) => {
setBlogData(res.data);
console.log(res.data);
// console.log(res.data);
} catch (error) {
@@ -124,7 +125,7 @@ const Main = ({ brdcum, bgimg }) => {
<div className="story_text">
<h3>{data.post_title}</h3>
<div dangerouslySetInnerHTML={{__html: data && data.post_content.substring(0,100)+' . . .'}}></div>
<Link to={`/blog-single/${data.id}`} state={{data}}>
<Link to={`/blog-single/${data.id}`} state={{data, allData: blogData}}>
READ MORE
</Link>
</div>
+65 -21
View File
@@ -5,15 +5,46 @@ 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();
const data = location.state?.data;
console.log("location", location, data);
const [blogData, setBlogData] = useState([]);
const [newAllData, setNewAllData] = useState([]);
useEffect(() => {
getBlogData();
getLatestBlog();
}, [location.state?.data]);
const api = new SiteService();
const data = location.state?.data;
const allData = location.state?.allData;
const getLatestBlog = () =>{
const arrData = [ ...allData ];
const itemIndex = arrData.findIndex(x => x.id === data.id)
arrData.splice(itemIndex, 1);
const newAllData = arrData.splice(0, 3);
setNewAllData(newAllData);
console.log('All data ', arrData, newAllData);
}
const getBlogData = async () => {
try {
const res = await api.blogData();
setBlogData(res.data);
} catch (error) {
console.log("Error from blog data ", error);
}
};
return (
<>
@@ -238,21 +269,34 @@ const Main = ({brdcum}) => {
<p>Lorem Ipsum is simply dummy text of the printing and typese tting <br/> indus orem Ipsum has beenthe standard dummy.</p>
</div>
<div className="row">
<div className="col-md-4">
<div className="story_box" data-aos="fade-up" data-aos-duration="1500">
<div className="story_img">
<img src="assets/images/story01.png" alt="image" />
<span>45 min ago</span>
</div>
<div className="story_text">
<h3>Cool features added!</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting
industry lorem Ipsum has.</p>
<Link to="#">READ MORE</Link>
</div>
</div>
</div>
<div className="col-md-4">
{newAllData.map((data) => {
return (
<div className="col-md-4">
<div className="story_box" data-aos="fade-up" data-aos-duration="1500">
<div className="story_img">
<img src={data.meta_value} alt="image" />
<span>45 min ago</span>
</div>
<div className="story_text">
<h3>{data.post_title}</h3>
<div dangerouslySetInnerHTML={{__html: data.post_content.substring(0,300)+' . . .'}}></div>
<Link to={`/blog-single/${data.id}`} state={{data}}>
READ MORE
</Link>
</div>
</div>
</div>
)})}
{/* <div className="col-md-4">
<div className="story_box" data-aos="fade-up" data-aos-duration="1500">
<div className="story_img">
<img src="assets/images/story02.png" alt="image" />
@@ -277,7 +321,7 @@ const Main = ({brdcum}) => {
<Link to="#">READ MORE</Link>
</div>
</div>
</div>
</div> */}
</div>
</div>
</section>
+9 -9
View File
@@ -94,13 +94,13 @@ const Main = ({ footer }) => {
</div>
<div className="col-lg-3 col-md-6 col-12">
<div className="links">
<h3>Help & Suport</h3>
<h3>Help & Support</h3>
<ul>
<li>
<Link to="/faq">FAQs</Link>
</li>
<li>
<Link to="/#how_it_work">How it works</Link>
<a href="#how_it_work">How it works</a>
</li>
<li>
<Link to="/terms">Terms & conditions</Link>
@@ -231,13 +231,13 @@ const Main = ({ footer }) => {
</div>
<div className="col-lg-3 col-md-6 col-12">
<div className="links">
<h3>Help & Suport</h3>
<h3>Help & Support</h3>
<ul>
<li>
<Link to="/faq">FAQs</Link>
</li>
<li>
<Link to="/#how_it_work">How it works</Link>
<a href="/how_it_work">How it works</a>
</li>
<li>
<Link to="/terms">Terms & conditions</Link>
@@ -367,7 +367,7 @@ const Main = ({ footer }) => {
<Link to="#">Support</Link>
</li>
<li>
<Link to="/work">How it works</Link>
<a href="/how_it_work">How it works</a>
</li>
<li>
<Link to="/terms">Terms & conditions</Link>
@@ -483,7 +483,7 @@ const Main = ({ footer }) => {
<div className="col-lg-3 col-md-6 col-12">
<div className="links">
<h3>Help & Suport</h3>
<h3>Help & Support</h3>
<ul>
<li>
<Link to="/faq">FAQs</Link>
@@ -492,7 +492,7 @@ const Main = ({ footer }) => {
<Link to="#">Support</Link>
</li>
<li>
<Link to="/work">How it works</Link>
<a href="/how_it_work">How it works</a>
</li>
<li>
<Link to="/terms">Terms & conditions</Link>
@@ -615,7 +615,7 @@ const Main = ({ footer }) => {
</div>
<div className="col-lg-3 col-md-6 col-12">
<div className="links">
<h3>Help & Suport</h3>
<h3>Help & Support</h3>
<ul>
<li>
<Link to="/faq">FAQs</Link>
@@ -624,7 +624,7 @@ const Main = ({ footer }) => {
<Link to="#">Support</Link>
</li>
<li>
<Link to="/work">How it works</Link>
<a href="/how_it_work">How it works</a>
</li>
<li>
<Link to="/terms">Terms & conditions</Link>
+5 -5
View File
@@ -286,7 +286,7 @@ const Main = ({navbar}) => {
<span className="drp_btn" ><i className="icofont-rounded-down"></i></span>
<div className="sub_menu" style={{ display: show ? "block" : "none" }}>
<ul>
<li><Link to="/">Home Defoult</Link></li>
<li><Link to="/">Home Default</Link></li>
</ul>
</div>
@@ -359,7 +359,7 @@ const Main = ({navbar}) => {
<span className="drp_btn" ><i className="icofont-rounded-down"></i></span>
<div className="sub_menu">
<ul>
<li><Link to="/">Home Defoult</Link></li>
<li><Link to="/">Home Default</Link></li>
</ul>
@@ -404,7 +404,7 @@ const Main = ({navbar}) => {
<span className="drp_btn" ><i className="icofont-rounded-down"></i></span>
<div className="sub_menu" style={{ display: show ? "block" : "none" }}>
<ul>
<li><Link to="/">Home Defoult</Link></li>
<li><Link to="/">Home Default</Link></li>
</ul>
@@ -477,7 +477,7 @@ const Main = ({navbar}) => {
<span className="drp_btn" ><i className="icofont-rounded-down"></i></span>
<div className="sub_menu">
<ul>
<li><Link to="/">Home Defoult</Link></li>
<li><Link to="/">Home Default</Link></li>
</ul>
@@ -533,7 +533,7 @@ const Main = ({navbar}) => {
<span className="drp_btn" ><i className="icofont-rounded-down"></i></span>
<div className="sub_menu" style={{ display: show ? "block" : "none" }}>
<ul>
<li><Link to="/">Home Defoult</Link></li>
<li><Link to="/">Home Default</Link></li>
</ul>
+2 -1
View File
@@ -1,5 +1,7 @@
import React , { useState , useEffect} from 'react'
import { Link } from 'react-router-dom'
import blueapp from "../../../assets/images/appstore_blue.png"
import blue from "../../../assets/images/googleplay_blue.png"
import Bredcrumb from '../../Bredcrumb/Main'
import BGImg from "../../../assets/images/bread_crumb_bg.png"
import BGImg1 from "../../../assets/images/bread_crumb_bg_one.png"
@@ -64,7 +66,6 @@ const Main = ({brdcum}) => {
tag="Faq"
bgimg={BGImg2}/>}
{/* <section className="row_am faq_section">
<div className="container">
<div className="faq_panel">
+7 -7
View File
@@ -328,16 +328,16 @@ const Main = ({brdcum}) => {
<h2>Lets download free from apple and play store</h2>
<p>Instant free download from apple and play store. All you need is an iPhone or Android device to enjoy all personalized metrics for personal use. Welcome to myFit App.</p>
</div>
<ul className="app_btn">
<ul className="app_btn">
<li>
<Link to="#">
<img src="assets/images/appstore_blue.png" alt="image" />
</Link>
<a href={process.env.REACT_APP_ANDROID_URL}>
<img src={blueapp} alt="image" />
</a>
</li>
<li>
<Link to="#">
<img src="assets/images/googleplay_blue.png" alt="image" />
</Link>
<a href={process.env.REACT_APP_IOS_URL}>
<img src={blue} alt="image" />
</a>
</li>
</ul>
</div>
+2
View File
@@ -13,6 +13,7 @@ import Pricing from "../component/Pricing/Main";
import Blog from "../component/Blog/Blog/Main";
import BlogSingle from "../component/Blog/BlogSingle/Main";
import Terms from "../component/Terms/Main";
import Privacy from "../component/Privacy/Main";
@@ -87,6 +88,7 @@ const Routing = () => {
<Route path="/blog-single/:id" element={<BlogSingle brdcum={brdcum} />} />
<Route path="/terms" element={<Terms brdcum={brdcum} />} />
<Route path="/privacy" element={<Privacy brdcum={brdcum} />} />
</Routes>
{footerpage && <Footer footer={footer} />}
</>
+1 -1
View File
@@ -6,7 +6,7 @@ class SiteService {
console.log("Er are here anyway");
}
// Blog Data {Get}
blogData() {
blogData(id) {
return this.getAuxEnd("/blogdata", null);
}