refactor: centralize hotel name fallback via FALLBACK_HOTEL_NAME
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:
1 parent
6b2819aa20
commit
e00e9ca2dc
31 files changed
+113
-56
No files matched your search
@@ -3,6 +3,7 @@ import Link from "next/link";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import type { Session } from "next-auth";
|
||||
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||
import { resolveHotelName } from "@/lib/hotel-name";
|
||||
import { MobileNav } from "@/components/mobile-nav";
|
||||
import { NavDropdown } from "@/components/nav-dropdown";
|
||||
import { NavbarColorPicker } from "@/components/navbar-color-picker";
|
||||
@@ -10,6 +11,7 @@ import { ThemeSwitcher } from "@/components/theme-switcher";
|
||||
|
||||
export async function Navigation({ session }: { session: Session | null }) {
|
||||
const t = await getTranslations("nav");
|
||||
const brandLabel = await resolveHotelName();
|
||||
const isStaff = (session?.user?.rank ?? 0) >= 7;
|
||||
|
||||
return (
|
||||
@@ -170,6 +172,7 @@ export async function Navigation({ session }: { session: Session | null }) {
|
||||
<MobileNav
|
||||
menuLabel={t("openMenu") || "Open menu"}
|
||||
closeLabel={t("closeMenu") || "Close menu"}
|
||||
brandLabel={brandLabel}
|
||||
>
|
||||
<Link href="/" className="nav-item">
|
||||
<Image
|
||||
|
||||
Reference in new issue
Block a user