Update src/app/blog/page.tsx

This commit is contained in:
2026-01-27 23:55:49 +00:00
parent 66fc3ff668
commit 18eca1a59e

View File

@@ -23,39 +23,39 @@ type BlogPost = {
const defaultPosts: BlogPost[] = [ const defaultPosts: BlogPost[] = [
{ {
id: "1", category: "Design", title: "UX review presentations", excerpt: "How do you create compelling presentations that wow your colleagues and impress your managers?", imageSrc: "/placeholders/placeholder3.avif", imageAlt: "Abstract design with purple and silver tones", authorName: "Olivia Rhye", authorAvatar: "/placeholders/placeholder3.avif", date: "20 Jan 2025", onBlogClick: () => console.log("Blog 1 clicked"), id: "1", category: "Cosmetic Dentistry", title: "The Art of Smile Design", excerpt: "Discover how our digital smile design technology helps you visualize your perfect smile before treatment begins.", imageSrc: "https://images.unsplash.com/photo-1588776694971-91b1560f9b5e?w=800&h=600&fit=crop", imageAlt: "Smile design consultation", authorName: "Dr. Elizabeth Foster", authorAvatar: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop", date: "20 Jan 2025", onBlogClick: () => console.log("Blog 1 clicked"),
}, },
{ {
id: "2", category: "Development", title: "Building scalable applications", excerpt: "Learn the best practices for building applications that can handle millions of users.", imageSrc: "/placeholders/placeholder4.webp", imageAlt: "Development workspace", authorName: "John Smith", authorAvatar: "/placeholders/placeholder4.webp", date: "18 Jan 2025", onBlogClick: () => console.log("Blog 2 clicked"), id: "2", category: "Dental Technology", title: "Advanced Implant Solutions", excerpt: "Learn how modern dental implant technology restores function and beauty with natural-looking results.", imageSrc: "https://images.unsplash.com/photo-1606811841689-23def00b0ae4?w=800&h=600&fit=crop", imageAlt: "Dental implant technology", authorName: "Dr. Michael Chang", authorAvatar: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=400&h=400&fit=crop", date: "18 Jan 2025", onBlogClick: () => console.log("Blog 2 clicked"),
}, },
{ {
id: "3", category: "Marketing", title: "Content strategy essentials", excerpt: "Discover how to create a content strategy that drives engagement and conversions.", imageSrc: "/placeholders/placeholder3.avif", imageAlt: "Marketing strategy board", authorName: "Sarah Johnson", authorAvatar: "/placeholders/placeholder3.avif", date: "15 Jan 2025", onBlogClick: () => console.log("Blog 3 clicked"), id: "3", category: "Preventive Care", title: "Maintaining Your Perfect Smile", excerpt: "Expert tips on maintaining your dental health and preserving your beautiful smile for life.", imageSrc: "https://images.unsplash.com/photo-1579154204601-01d8d844e250?w=800&h=600&fit=crop", imageAlt: "Preventive dental care", authorName: "Dr. Sarah Johnson", authorAvatar: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=400&h=400&fit=crop", date: "15 Jan 2025", onBlogClick: () => console.log("Blog 3 clicked"),
}, },
{ {
id: "4", category: "Product", title: "Product management 101", excerpt: "Everything you need to know to become an effective product manager in 2025.", imageSrc: "/placeholders/placeholder4.webp", imageAlt: "Product planning session", authorName: "Mike Davis", authorAvatar: "/placeholders/placeholder4.webp", date: "12 Jan 2025", onBlogClick: () => console.log("Blog 4 clicked"), id: "4", category: "Patient Stories", title: "Smile Transformations: Real Results", excerpt: "See how our patients' lives changed when they invested in their smiles through our personalized treatments.", imageSrc: "https://images.unsplash.com/photo-1631217174556-e5b42bb30ac4?w=800&h=600&fit=crop", imageAlt: "Smile transformation results", authorName: "Dr. James Mitchell", authorAvatar: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=400&h=400&fit=crop", date: "12 Jan 2025", onBlogClick: () => console.log("Blog 4 clicked"),
}, },
]; ];
const footerColumns: FooterColumn[] = [ const footerColumns: FooterColumn[] = [
{ {
title: "Product", items: [ title: "Services", items: [
{ label: "Features", href: "/features" }, { label: "Cosmetic Dentistry", href: "#services" },
{ label: "Pricing", href: "/pricing" }, { label: "Dental Implants", href: "#services" },
{ label: "FAQ", href: "/faq" }, { label: "Orthodontics", href: "#services" },
], ],
}, },
{ {
title: "Company", items: [ title: "Practice", items: [
{ label: "About", href: "/about" }, { label: "About Us", href: "#about" },
{ label: "Blog", href: "/blog" }, { label: "Our Team", href: "#team" },
{ label: "Careers", href: "/careers" }, { label: "Contact", href: "#contact" },
], ],
}, },
{ {
title: "Resources", items: [ title: "Resources", items: [
{ label: "Documentation", href: "/docs" }, { label: "Blog", href: "/blog" },
{ label: "Support", href: "/support" }, { label: "Patient Forms", href: "#" },
{ label: "Contact", href: "/contact" }, { label: "Smile Gallery", href: "#" },
], ],
}, },
]; ];
@@ -88,7 +88,7 @@ export default function BlogPage() {
if (Array.isArray(data) && data.length > 0) { if (Array.isArray(data) && data.length > 0) {
const mappedPosts = data.map((post: any) => ({ const mappedPosts = data.map((post: any) => ({
id: post.id || String(Math.random()), id: post.id || String(Math.random()),
category: post.category || "General", title: post.title || "Untitled", excerpt: post.excerpt || post.content.slice(0, 30) || "", imageSrc: post.imageUrl || "/placeholders/placeholder3.avif", imageAlt: post.imageAlt || post.title || "", authorName: post.author?.name || "Anonymous", authorAvatar: post.author?.avatar || "/placeholders/placeholder3.avif", date: post.date || post.createdAt || new Date().toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" }), category: post.category || "Dental Care", title: post.title || "Untitled", excerpt: post.excerpt || post.content.slice(0, 30) || "", imageSrc: post.imageUrl || "https://images.unsplash.com/photo-1588776694971-91b1560f9b5e?w=800&h=600&fit=crop", imageAlt: post.imageAlt || post.title || "", authorName: post.author?.name || "Anonymous", authorAvatar: post.author?.avatar || "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=400&h=400&fit=crop", date: post.date || post.createdAt || new Date().toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" }),
onBlogClick: () => console.log(`Blog ${post.id} clicked`), onBlogClick: () => console.log(`Blog ${post.id} clicked`),
})); }));
setPosts(mappedPosts); setPosts(mappedPosts);
@@ -122,26 +122,25 @@ export default function BlogPage() {
<ReactLenis root> <ReactLenis root>
<div className="min-h-screen bg-background"> <div className="min-h-screen bg-background">
<NavbarLayoutFloatingInline <NavbarLayoutFloatingInline
brandName="Pizzeria Madrid" brandName="Luxury Dental Care"
navItems={[ navItems={[
{ name: "Home", id: "/home" }, { name: "Home", id: "/" },
{ name: "Home", id: "hero" }, { name: "Services", id: "services" },
{ name: "Pizzas", id: "pizzas" },
{ name: "About", id: "about" }, { name: "About", id: "about" },
{ name: "Contact", id: "contact" } { name: "Contact", id: "contact" }
]} ]}
button={{ text: "Reserve Now", href: "#contact" }} button={{ text: "Schedule Consultation", href: "#contact" }}
/> />
{isLoading ? ( {isLoading ? (
<div className="w-content-width mx-auto py-20 text-center"> <div className="w-content-width mx-auto py-20 text-center">
<p className="text-foreground">Loading posts...</p> <p className="text-foreground">Loading articles...</p>
</div> </div>
) : ( ) : (
<BlogCardOne <BlogCardOne
blogs={posts} blogs={posts}
title="Latest Articles" title="Dental Care Insights"
description="Stay updated with our latest insights" description="Learn from our expert dentists about the latest in cosmetic, restorative, and preventive dental care"
textboxLayout="default" textboxLayout="default"
useInvertedBackground="noInvert" useInvertedBackground="noInvert"
carouselMode="buttons" carouselMode="buttons"
@@ -150,31 +149,31 @@ export default function BlogPage() {
)} )}
<FooterBase <FooterBase
logoText="Pizzeria Madrid" logoText="Luxury Dental Care California"
copyrightText="© 2025 Pizzeria Madrid | Authentic Italian Pizza Since 2008" copyrightText="© 2025 Luxury Dental Care | Premium Dentistry Since 2005"
columns={[ columns={[
{ {
title: "Menu", items: [ title: "Services", items: [
{ label: "Our Pizzas", href: "pizzas" }, { label: "Cosmetic Dentistry", href: "#services" },
{ label: "Appetizers", href: "#" }, { label: "Dental Implants", href: "#services" },
{ label: "Desserts", href: "#" }, { label: "Orthodontics", href: "#services" },
{ label: "Beverages", href: "#" } { label: "Restorative Care", href: "#services" }
] ]
}, },
{ {
title: "Restaurant", items: [ title: "Practice", items: [
{ label: "About Us", href: "about" }, { label: "About Us", href: "#about" },
{ label: "Hours", href: "#" }, { label: "Our Team", href: "#team" },
{ label: "Location", href: "#" }, { label: "Technology", href: "#features" },
{ label: "Contact", href: "contact" } { label: "Contact", href: "#contact" }
] ]
}, },
{ {
title: "Connect", items: [ title: "Connect", items: [
{ label: "Instagram", href: "https://instagram.com" }, { label: "Instagram", href: "https://instagram.com" },
{ label: "Facebook", href: "https://facebook.com" }, { label: "Facebook", href: "https://facebook.com" },
{ label: "Twitter", href: "https://twitter.com" }, { label: "Google Reviews", href: "https://google.com" },
{ label: "Reviews", href: "#" } { label: "Blog", href: "/blog" }
] ]
} }
]} ]}
@@ -183,4 +182,4 @@ export default function BlogPage() {
</ReactLenis> </ReactLenis>
</ThemeProvider> </ThemeProvider>
); );
} }