import React from 'react'; import Link from 'next/link'; import Image from 'next/image'; import { Post } from '@/types/types'; import { Calendar, User, ArrowRight } from 'lucide-react'; interface FeaturedPostProps { post: Post; } export function FeaturedPost({ post }: FeaturedPostProps) { // Formatowanie daty const dateObj = new Date(post.date); const formattedDate = dateObj.toLocaleDateString('pl-PL', { day: 'numeric', month: 'long', year: 'numeric' }); // Tłumaczenie kategorii const categoryLabels: Record = { 'klimatyzacja': 'Klimatyzacja', 'remonty': 'Remonty', 'hydraulika': 'Hydraulika', 'porady': 'Porady' }; return (
{/* Obraz */}
{post.title}
{categoryLabels[post.category] || post.category}
{/* Treść */}
{formattedDate}
{post.author && (
{post.author}
)}

{post.title}

{post.excerpt}

Czytaj pełny artykuł
); }