fetch real api

This commit is contained in:
rahat0078
2026-04-06 01:05:05 +06:00
parent d856617c51
commit a8b73d81ec
7 changed files with 40 additions and 29 deletions
+6 -2
View File
@@ -9,11 +9,15 @@ import Navbar from '@/components/Navbar';
import Footer from '@/components/Footer';
import PageTransition from '@/components/PageTransition';
import { getPostBySlug, getRelatedPosts } from '@/data/blogData';
import { useBlogById } from '@/hooks/queires/useBlogs';
export default function BlogArticle() {
const { slug } = useParams<{ slug: string }>();
const { id } = useParams<{ id: string }>();
const {data} = useBlogById(id);
const post = data?.data.data
const navigate = useNavigate();
const post = getPostBySlug(slug || '');
// const post = getPostBySlug(id || '');
if (!post) {
return (