Compare commits

...

8 Commits

6 changed files with 70 additions and 23 deletions
+1
View File
@@ -42,6 +42,7 @@ const Main = ({ brdcum, bgimg }) => {
}
}
};
return (
<>
+3 -2
View File
@@ -16,7 +16,7 @@ const Main = ({ brdcum }) => {
let api_call = new SiteService();
useEffect(() => {
getBlogData();
}, [blogData]);
}, []);
const getBlogData = async () => {
/*
@@ -185,7 +185,8 @@ const Main = ({ brdcum }) => {
dangerouslySetInnerHTML={{
__html: item.post_content.substring(0, 100) + " . . .",
}}></div>
<Link to={`/blogdetails/${item.id}`}>READ MORE</Link>
<a href={`/blogdetails/${item.id}`}>READ MORE</a>
{/* <Link to={`/blogdetails/${item.id}`}>READ MORE</Link> */}
</div>
</div>
</div>
+7 -6
View File
@@ -94,7 +94,7 @@ const Main = ({ brdcum }) => {
// Checking for errors
if (contact?.data?.status < 1 || contact?.data?.message_id == "")
return (errText.textContent =
"unable to send your message, please try able");
"unable to send your message, please try again");
else {
response.innerHTML = `<p> SEND MESSAGE </p>`;
@@ -110,6 +110,7 @@ const Main = ({ brdcum }) => {
}
})
.catch((error) => {
errText.textContent = "unable to send your message, please try again"
console.log(error);
});
};
@@ -119,9 +120,9 @@ const Main = ({ brdcum }) => {
allCountry().then((data) => setCountries(Object.values(data.data)));
}, []);
useEffect(() => {
myData
}, [myData]);
// useEffect(() => {
// myData
// }, [myData]);
return (
<>
@@ -195,12 +196,12 @@ const Main = ({ brdcum }) => {
name="name"
type="text"
placeholder="Name"
errorMessage="Please enter your name"
errorMessage="Please enter your first and last name. (e.g: Mark John)"
required={true}
maxLenght={35}
value={values.name}
onChange={onChange}
pattern="^[A-Za-z]{1,35}$"
pattern="^$|^[a-zA-Z]+( [a-zA-Z]+)?$+( [a-zA-Z]+)?$"
/>
<FormInput
+52 -8
View File
@@ -1,20 +1,64 @@
import { Link } from 'react-router-dom'
import React from 'react'
import story1 from '../../../assets/images/story01.png'
import story2 from '../../../assets/images/story02.png'
import story3 from '../../../assets/images/story03.png'
import React, { useEffect, useState } from "react";
import { Link } from 'react-router-dom';
// import story1 from '../../../assets/images/story01.png';
// import story2 from '../../../assets/images/story02.png';
// import story3 from '../../../assets/images/story03.png';
import SiteService from "../../../vendors/service/siteService";
const Main = () => {
const [blogData, setBlogData] = useState([]);
let api = new SiteService();
useEffect(() => {
getBlogData();
}, []);
const getBlogData = async () => {
try {
let res = await api.blogData();
setBlogData(res.data);
} catch (error) {
console.log("Error from blog data ", error);
}
};
return (
<>
<section className="row_am latest_story" id="blog">
<div className="container">
<div className="section_title" data-aos="fade-in" data-aos-duration="1500" data-aos-delay="100">
<h2>Read latest <span>story</span></h2>
<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">
{blogData.slice(1, 4).map((item, index) => (
<div
className="col-md-4"
key={index}>
<div
className="story_box"
data-aos="fade-up"
data-aos-duration="1500">
<div className="story_img">
<img
src={item.meta_value}
alt="image"
/>
<span>{new Date(item.post_date).toDateString()}</span>
</div>
<div className="story_text">
<h3>{item.post_title}</h3>
<div
dangerouslySetInnerHTML={{
__html: item.post_content.substring(0, 100) + " . . .",
}}></div>
<Link to={`/blogdetails/${item.id}`}>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={story1} alt="image" />
@@ -53,7 +97,7 @@ const Main = () => {
<Link to="/blog-single">READ MORE</Link>
</div>
</div>
</div>
</div> */}
</div>
</div>
</section>
+5 -5
View File
@@ -31,7 +31,7 @@ const Main = ({brdcum}) => {
<Bredcrumb
no={1}
title="Have questions? look here"
paragraph="Lorem Ipsum is simply dummy text of the printing and typesetting"
paragraph="Learn more about myFit through answers to frequently asked questions."
tag="Faq"
bgimg={BGImg}/>}
@@ -39,7 +39,7 @@ const Main = ({brdcum}) => {
<Bredcrumb
no={2}
title="Have questions? look here"
paragraph="Lorem Ipsum is simply dummy text of the printing and typesetting"
paragraph="Learn more about myFit through answers to frequently asked questions."
tag="Faq"
bgimg={BGImg1}/>}
@@ -47,7 +47,7 @@ const Main = ({brdcum}) => {
<Bredcrumb
no={5}
title="Have questions? look here"
paragraph="Lorem Ipsum is simply dummy text of the printing and typesetting"
paragraph="Learn more about myFit through answers to frequently asked questions."
tag="Faq"
bgimg={BGImg}/>}
@@ -55,14 +55,14 @@ const Main = ({brdcum}) => {
<Bredcrumb
no={3}
title="Have questions? look here"
paragraph="Lorem Ipsum is simply dummy text of the printing and typesetting"
paragraph="Learn more about myFit through answers to frequently asked questions."
tag="Faq" />}
{brdcum.b4 &&
<Bredcrumb
no={4}
title="Have questions? look here"
paragraph="Lorem Ipsum is simply dummy text of the printing and typesetting"
paragraph="Learn more about myFit through answers to frequently asked questions."
tag="Faq"
bgimg={BGImg2}/>}
+2 -2
View File
@@ -16,8 +16,8 @@ class SiteService {
}
// Contact Data{POST}
contactData() {
return this.postAuxEnd("/contact", null)
contactData(value) {
return this.postAuxEnd("/contact", value)
}
faqData() {