diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index f446f30..114ea84 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -22,16 +22,16 @@ type 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: "Italian Cuisine", title: "The Art of Fresh Pasta", excerpt: "Discover the traditional techniques of making authentic Italian pasta from scratch, passed down through generations.", imageSrc: "https://img.b2bpic.net/free-photo/raw-pasta-near-dough_23-2147749572.jpg", imageAlt: "Fresh pasta making", authorName: "Chef Marco", authorAvatar: "https://img.b2bpic.net/free-photo/chef-cooking-kitchen-while-wearing-professional-attire_23-2151208316.jpg", 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: "Wine Pairing", title: "Italian Wines: A Tasting Journey", excerpt: "Explore the finest wines from Tuscany, Piedmont, and beyond. Learn how to pair them with your favorite Italian dishes.", imageSrc: "https://img.b2bpic.net/free-photo/chef-holding-uncooked-pasta-hands_23-2148360857.jpg", imageAlt: "Wine selection", authorName: "Sommelier Sofia", authorAvatar: "https://img.b2bpic.net/free-photo/high-angle-chef-male-kitchen_23-2148471868.jpg", 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: "Chef's Corner", title: "Seasonal Ingredients: Winter Edition", excerpt: "Explore the bounty of Italian winter produce and how our chefs create exceptional dishes with seasonal ingredients.", imageSrc: "https://img.b2bpic.net/free-photo/chef-arranging-raw-pasta_23-2148343569.jpg", imageAlt: "Seasonal vegetables", authorName: "Head Chef Giovanni", authorAvatar: "https://img.b2bpic.net/free-photo/he-is-satisfied-from-his-life_329181-2789.jpg", 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: "Food Culture", title: "The History of Italian Cuisine", excerpt: "A journey through centuries of culinary traditions that have shaped the Italian kitchen into what it is today.", imageSrc: "https://img.b2bpic.net/free-photo/close-up-hands-with-pizza-cutter-utensils_23-2148296890.jpg", imageAlt: "Traditional Italian kitchen", authorName: "Food Historian Elena", authorAvatar: "https://img.b2bpic.net/free-photo/portrait-confident-male-chef-kitchen_23-2147863584.jpg", date: "12 Jan 2025", onBlogClick: () => console.log("Blog 4 clicked"), }, ]; @@ -64,7 +64,7 @@ export default function BlogPage() { if (Array.isArray(data) && data.length > 0) { const mappedPosts = data.map((post: any) => ({ 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 || "General", title: post.title || "Untitled", excerpt: post.excerpt || post.content.slice(0, 30) || "", imageSrc: post.imageUrl || "https://img.b2bpic.net/free-photo/raw-pasta-near-dough_23-2147749572.jpg", imageAlt: post.imageAlt || post.title || "", authorName: post.author?.name || "Anonymous", authorAvatar: post.author?.avatar || "https://img.b2bpic.net/free-photo/chef-cooking-kitchen-while-wearing-professional-attire_23-2151208316.jpg", date: post.date || post.createdAt || new Date().toLocaleDateString("en-GB", { day: "numeric", month: "short", year: "numeric" }), onBlogClick: () => console.log(`Blog ${post.id} clicked`), })); setPosts(mappedPosts); @@ -167,4 +167,4 @@ export default function BlogPage() { ); -} \ No newline at end of file +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index ad1af6b..82c77cc 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1258,4 +1258,4 @@ export default function RootLayout({ ); -} \ No newline at end of file +}