refactor: remove hotel-name fallback, fail fast when unconfigured
CI / check (push) Failing after 39s
CI / release (push) Skipped
CI / deploy (push) Skipped

Drop the hardcoded FALLBACK_HOTEL_NAME ("Atom") preset and the brand.ts
module. HOTEL_NAME is now a required env var: if it (and the CMS hotel_name
setting) is missing the site fails validation at startup/build with a clear
message instead of silently rendering a placeholder hotel name.

resolveHotelName() resolves CMS hotel_name -> required HOTEL_NAME only.
Callers that used the preset (api/home route catch branch, CMS settings form
default, mobile-nav/logo-generator prop defaults) now use the configured name
or an empty default; the real name is already passed in by server parents.
This commit is contained in:
openhands committed 2026-08-27 16:35:00 +02:00
1 parent 555c783d55
commit 164a4f4ef6
8 files changed
+19 -30

No files matched your search

+1 -2
View File
@@ -3,7 +3,6 @@
import { AnimatePresence, motion } from "motion/react";
import Image from "next/image";
import { type ReactNode, useRef, useState } from "react";
import { FALLBACK_HOTEL_NAME } from "@/lib/brand";
import { mobileMenuVariants } from "@/lib/motion";
interface MobileNavProps {
@@ -17,7 +16,7 @@ export function MobileNav({
children,
menuLabel = "Open menu",
closeLabel = "Close menu",
brandLabel = FALLBACK_HOTEL_NAME,
brandLabel = "",
}: MobileNavProps) {
const [open, setOpen] = useState(false);
const detailsRef = useRef<HTMLDivElement>(null);
+1 -2
View File
@@ -16,10 +16,9 @@ import {
renderToCanvas,
} from "@/components/public/sprite-font";
import { ContentCard } from "@/components/public/ui";
import { FALLBACK_HOTEL_NAME } from "@/lib/brand";
export default function LogoGenerator({
initialText = FALLBACK_HOTEL_NAME,
initialText = "",
}: {
initialText?: string;
}) {