Update src/app/blog/page.tsx
This commit is contained in:
@@ -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" },
|
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{isLoading ? (
|
|
||||||
<div className="w-content-width mx-auto py-20 text-center">
|
|
||||||
<p className="text-foreground">Loading posts...</p>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
<main className="flex flex-col items-center justify-center min-h-screen py-20 px-4">
|
||||||
<div id="blog" data-section="blog">
|
<div className="text-center">
|
||||||
<BlogCardThree
|
<h1 className="text-4xl font-bold">Blog</h1>
|
||||||
blogs={posts}
|
<p className="mt-4 text-lg text-foreground/80">Our latest articles and news will be posted here. Stay tuned!</p>
|
||||||
title="Featured Articles"
|
|
||||||
description="Explore our latest insights"
|
|
||||||
animationType="slide-up"
|
|
||||||
textboxLayout="default"
|
|
||||||
useInvertedBackground={false}
|
|
||||||
carouselMode="buttons"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
</main>
|
||||||
|
|
||||||
{/* No footer is rendered as per the empty FOOTER_INFO and FOOTER_PROPS_SCHEMA */}
|
|
||||||
</ReactLenis>
|
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user