import Link from "next/link"; import { excerpt } from "@/lib/format"; import { prisma } from "@/lib/prisma"; import { siteSettings } from "@/lib/services/site-settings"; export const dynamic = "force-dynamic"; export default async function HomePage() { const [hotelName, articles] = await Promise.all([ siteSettings.get("hotel_name", "Atom"), prisma.websiteArticles.findMany({ orderBy: { createdAt: "desc" }, take: 4, }), ]); return (

Welcome to {hotelName ?? "Atom"}

AtomCMS → Next.js. Reading live data through the converted Prisma schema.

Latest news

{articles.length === 0 ? (

No articles yet.

) : (
{articles.map((a) => (
{a.image ? : null}

{a.title}

{excerpt(a.shortStory, 120)}

))}
)}
); }