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

+5 -4
View File
@@ -6,6 +6,7 @@ import { cached } from "@/lib/cache";
import { avatarImageUrl } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
import { prisma } from "@/lib/prisma";
import { resolveHotelName } from "@/lib/hotel-name";
import { siteSettings } from "@/lib/services/site-settings";
import { auth } from "@/lib/auth";
@@ -13,7 +14,7 @@ export const revalidate = 120;
async function getHotelData() {
const [hotelName, imagerRaw] = await Promise.all([
siteSettings.get("hotel_name", "Atom"),
resolveHotelName(),
siteSettings.get(
"habbo_imaging_url",
"https://www.habbo.com/habbo-imaging/avatarimage",
@@ -103,13 +104,13 @@ export default async function Home() {
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75" />
<span className="relative inline-flex rounded-full h-2 w-2 bg-green-500" />
</span>
{th("online", { count: online, hotel: hotelName ?? "Atom" })}
{th("online", { count: online, hotel: hotelName })}
</div>
<h1
className="text-4xl md:text-5xl lg:text-6xl font-black leading-[1.05] tracking-tight mb-4"
style={{ color: "var(--color-text-readable)" }}
>
{tp("welcome", { hotelName: hotelName ?? "Atom" })}
{tp("welcome", { hotelName })}
</h1>
<p
className="text-base md:text-lg leading-relaxed max-w-xl mb-8"
@@ -317,7 +318,7 @@ export default async function Home() {
}}
>
<h2 className="text-2xl md:text-3xl font-black tracking-tight mb-2" style={{ color: "var(--color-text-readable)" }}>
{tp("joinNow", { hotelName: hotelName ?? "Atom" })}
{tp("joinNow", { hotelName })}
</h2>
<p className="text-sm mb-6 max-w-sm mx-auto" style={{ color: "var(--color-text-muted)" }}>
{tp("welcomeBody")}