/** * Homepage — Split hero layout. * Left panel: site title, subtitle, navigation links. * Right panel: hero image carousel from Immich. */ import Link from 'next/link'; import { immich } from '@/lib/immich'; import { getConfig } from '@/lib/config'; import { imageUrl, assetPlaceholder } from '@/lib/urls'; import { HeroCarousel } from '@/components/HeroCarousel'; import { FadeIn } from '@/components/FadeIn'; // Render at request time — requires live Immich connection export const dynamic = 'force-dynamic'; export default async function HomePage() { const config = getConfig(); const [subpages, albums] = await Promise.all([ immich.getSubpages(), immich.getStandaloneAlbums(), ]); // Fetch ThumbHash for all hero images const heroData = await Promise.all( config.heroImages.map(async (id) => { const asset = await immich.getAssetInfo(id); const ph = asset ? assetPlaceholder(asset) : null; return { src: imageUrl(id, 'preview'), ...(ph ? { blurDataURL: ph.blurDataURL } : {}), }; }), ); return (
{/* ── Left Panel ──────────────────────────────── */}

{config.siteTitle}

{config.siteSubtitle && (

{config.siteSubtitle}

)}
{/* ── Right Panel (Hero Carousel) ─────────────── */}
); }