add loading all page & change bugs

This commit is contained in:
Ehsan
2024-09-05 22:20:18 +03:30
parent 087ed4a818
commit c45a161fcb
72 changed files with 1208 additions and 661 deletions
+15 -3
View File
@@ -1,14 +1,26 @@
'use client'
import { useEffect, useState } from "react";
import Detail from "./detail";
import Head from "./head";
import RelatedContent from "./relatedContent";
function BlogPage({ article, articles }) {
const [loading, setLoading] = useState(true);
useEffect(() => {
setTimeout(() => {
setLoading(false);
}, 2000);
}, []);
return (
<div className="padding-responsive pt-[84px] sm:pt-[110px] md:pt-[140px] lg:pt-[168px]">
<Head data={article} />
<Head data={article} loading={loading} />
<div className="flex flex-col gap-y-[32px] lg:flex-row items-start justify-center gap-[24px] mt-[16px] sm:mt-[19px] md:mt-[21px] lg:mt-[24px]">
<Detail data={article} />
<RelatedContent data={articles} />
<Detail data={article} loading={loading} />
<RelatedContent data={articles} loading={loading} />
</div>
</div>
)