import { getDb } from '@/lib/db' import type { Memory, MediaItem } from '@/lib/types' import HeroSection from '@/components/HeroSection' import PhotoSlideshow from '@/components/PhotoSlideshow' import PhotoGallery from '@/components/PhotoGallery' import MemorySection from '@/components/MemorySection' import MusicPlayer from '@/components/MusicPlayer' import VideoGallery from '@/components/VideoGallery' export const dynamic = 'force-dynamic' export default async function HomePage() { const db = getDb() const photos = db .prepare("SELECT * FROM media WHERE type = 'photo' ORDER BY sort_order, created_at") .all() as MediaItem[] const videos = db .prepare("SELECT * FROM media WHERE type = 'video' ORDER BY sort_order, created_at") .all() as MediaItem[] const music = db .prepare("SELECT * FROM media WHERE type = 'music' ORDER BY sort_order, created_at") .all() as MediaItem[] const memories = db .prepare('SELECT * FROM memories ORDER BY created_at DESC') .all() as Memory[] return (
{/* Hero */} {/* Navigation anchors */} {/* Photo section */} {photos.length > 0 && (

Erinnerungen in Bildern

{photos.length > 1 && }
)} {/* Memories */} {/* Videos */} {/* Music player */} {/* Footer */}
) }