refactor: centralize hotel name fallback via FALLBACK_HOTEL_NAME
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 2m6s

Route all user-facing Atom hotel defaults through resolveHotelName (settings then HOTEL_NAME env then brand constant). Exclude Playwright e2e from tsconfig until deps are installed.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-22 18:45:59 +02:00
1 parent 6b2819aa20
commit e00e9ca2dc
31 files changed
+113 -56

No files matched your search

+4 -3
View File
@@ -3,12 +3,13 @@ import Link from "next/link";
import { getTranslations } from "next-intl/server";
import { cached } from "@/lib/cache";
import { prisma } from "@/lib/prisma";
import { resolveHotelName } from "@/lib/hotel-name";
import { siteSettings } from "@/lib/services/site-settings";
export async function SiteHeader() {
const t = await getTranslations("header");
const [hotelName, header, logo] = await Promise.all([
siteSettings.get("hotel_name", "Atom"),
resolveHotelName(),
siteSettings.get("cms_header", "/assets/images/background.png"),
siteSettings.get("cms_logo", ""),
]);
@@ -77,7 +78,7 @@ export async function SiteHeader() {
<Image
className="drop-shadow-2xl block"
src={logo}
alt={hotelName ?? "Hotel"}
alt={hotelName}
width={200}
height={120}
style={{ maxHeight: 120, width: "auto", height: "auto" }}
@@ -130,7 +131,7 @@ export async function SiteHeader() {
className="text-sm font-bold tracking-wide"
style={{ color: "rgba(255,255,255,0.9)" }}
>
{t("online", { count: online, hotel: hotelName ?? "Atom" })}
{t("online", { count: online, hotel: hotelName })}
</span>
</div>
</div>