fetch real api
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user