Formated the blog date and reduced the blog-post content in the blog gallery page
This commit is contained in:
@@ -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}) => {
|
||||
<div className="blog_inner_pannel">
|
||||
<div className="review">
|
||||
<span>Review</span>
|
||||
<span>{data && data.post_modified}</span>
|
||||
<span>{new Date (data && data.post_modified).toDateString()}</span>
|
||||
|
||||
</div>
|
||||
<div className="section_title">
|
||||
<h2>{data && data.post_title}</h2>
|
||||
@@ -88,20 +66,20 @@ const Main = ({brdcum}) => {
|
||||
<img src={data && data.meta_value} alt="image" />
|
||||
</div>
|
||||
<div className="info">
|
||||
<h3>{data && data.post_title}</h3>
|
||||
<p>{data && data.post_content}</p>
|
||||
|
||||
<h3>{data && data.post_name}</h3>
|
||||
<div dangerouslySetInnerHTML={{__html: data && data.post_content}}></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div className="blog_authore">
|
||||
<div className="authore_info">
|
||||
<div className="avtar">
|
||||
<img src="assets/images/blog_d02.png" alt="image" />
|
||||
{/* <img src="assets/images/blog_d02.png" alt="image" /> */}
|
||||
</div>
|
||||
<div className="text">
|
||||
<h3>{data && data.post_author}</h3>
|
||||
<span>{data && data.post_date}</span>
|
||||
{/* <h3>{data && data.post_author}</h3> */}
|
||||
<span>{new Date (data && data.post_date).toDateString()}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="social_media">
|
||||
@@ -113,70 +91,11 @@ const Main = ({brdcum}) => {
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className="blog_tags">
|
||||
<ul>
|
||||
<li className="tags"><p>Tags:</p></li>
|
||||
<li><span>app,</span></li>
|
||||
<li><span>rating,</span></li>
|
||||
<li><span>development</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section className="row_am comment_section">
|
||||
<div className="container">
|
||||
<div className="section_title">
|
||||
<h2>3 Comments</h2>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<div className="authore_info">
|
||||
<div className="avtar">
|
||||
<img src="assets/images/blog_d01.png" alt="image" />
|
||||
</div>
|
||||
<div className="text">
|
||||
<span>30 min ago</span>
|
||||
<h4>Dolly Shell</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div className="comment">
|
||||
<p>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. </p>
|
||||
</div>
|
||||
</li>
|
||||
<li className="replay_comment">
|
||||
<div className="authore_info">
|
||||
<div className="avtar">
|
||||
<img src="assets/images/blog_d02.png" alt="image" />
|
||||
</div>
|
||||
<div className="text">
|
||||
<span>15 min ago</span>
|
||||
<h4>Devil Joe</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div className="comment">
|
||||
<p>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.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div className="authore_info">
|
||||
<div className="avtar">
|
||||
<img src="assets/images/blog_d03.png" alt="image" />
|
||||
</div>
|
||||
<div className="text">
|
||||
<span>2 days ago</span>
|
||||
<h4>Sherly Shie</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div className="comment">
|
||||
<p>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. </p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<section className="row_am comment_form_section">
|
||||
<div className="container">
|
||||
|
||||
Reference in New Issue
Block a user