Update src/app/blog/page.tsx

This commit is contained in:
2026-02-24 16:06:32 +00:00
parent 16b15f82d0
commit 8d5ad8965d

View File

@@ -1,14 +1,9 @@
"use client"; "use client";
import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import { useBlogPosts } from "@/hooks/useBlogPosts";
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple'; import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
import BlogCardThree from '@/components/sections/blog/BlogCardThree';
export default function BlogPage() { export default function BlogPage() {
const { posts, isLoading } = useBlogPosts();
return ( return (
<ThemeProvider <ThemeProvider
defaultButtonVariant="expand-hover" defaultButtonVariant="expand-hover"
@@ -22,41 +17,23 @@ export default function BlogPage() {
secondaryButtonStyle="layered" secondaryButtonStyle="layered"
headingFontWeight="light" headingFontWeight="light"
> >
<ReactLenis root> <div id="nav" data-section="nav">
<NavbarStyleApple <NavbarStyleApple
brandName="No song" brandName="No song"
navItems={[ navItems={[
{ name: "Home", id: "/" }, { name: "Home", id: "/" },
{ name: "Hero", id: "hero-section" }, { name: "Products", id: "/#products-section" },
{ name: "About", id: "about-section" }, { name: "About", id: "/#about-section" },
{ name: "Feature", id: "features-section" }, { name: "Contact", id: "/#contact-section" },
{ name: "Product", id: "products-section" },
{ name: "Testimonial", id: "testimonials-section" },
{ name: "Contact", id: "contact-section" },
{ name: "Footer", id: "footer-section" },
]} ]}
/> />
</div>
{isLoading ? ( <main className="flex flex-col items-center justify-center min-h-screen py-20 px-4">
<div className="w-content-width mx-auto py-20 text-center"> <div className="text-center">
<p className="text-foreground">Loading posts...</p> <h1 className="text-4xl font-bold">Blog</h1>
</div> <p className="mt-4 text-lg text-foreground/80">Our latest articles and news will be posted here. Stay tuned!</p>
) : ( </div>
<div id="blog" data-section="blog"> </main>
<BlogCardThree
blogs={posts}
title="Featured Articles"
description="Explore our latest insights"
animationType="slide-up"
textboxLayout="default"
useInvertedBackground={false}
carouselMode="buttons"
/>
</div>
)}
{/* No footer is rendered as per the empty FOOTER_INFO and FOOTER_PROPS_SCHEMA */}
</ReactLenis>
</ThemeProvider> </ThemeProvider>
); );
} }