feat(home): label the top-bar online counter with the hotel name
CI / check (push) Successful in 33s
CI / tests-integration (push) Successful in 1m58s
CI / tests-unit (push) Successful in 2m1s
CI / tests-imaging-browsers (push) Successful in 1m24s
CI / tests-quality (push) Successful in 50s
CI / tests-ui (push) Successful in 4m34s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m12s

Use the shared LiveOnlineCount so the landing top bar reads "0 <hotel> online"
instead of a bare number, and drop the hotel name from the left (the logo
stays) so it is not shown twice.
This commit is contained in:
openhands committed 2026-10-18 20:16:23 +02:00
1 parent e7a6b2b602
commit 5c428c4526
1 file changed
+6 -15
+6 -15
View File
@@ -1,28 +1,27 @@
import Image from "next/image";
import { Clock } from "@/components/clock";
import { LanguageSwitcher } from "@/components/language-switcher";
import { LiveOnlineCounter } from "@/components/live-online-counter";
import { LiveOnlineCount } from "@/components/live-online-count";
import { Reveal } from "@/components/motion-reveal";
import { ThemeSwitcher } from "@/components/theme-switcher";
import { ICON_LIGHTHOUSE } from "@/lib/site-icons";
/**
* Shared frosted-glass top bar for the public pages (index, login, register).
* Shows the hotel logo + name on the left and the live online count, language /
* clock / theme controls on the right. One component so every public page keeps
* the exact same chrome instead of duplicating it.
* Shows the hotel logo on the left and the live "online" counter (which carries
* the hotel name), language / clock / theme controls on the right. One
* component so every public page keeps the exact same chrome instead of
* duplicating it.
*/
export function AuthTopBar({
hotelName,
logo,
online,
showHotelName = true,
}: {
hotelName: string;
logo?: string | null;
/** Live online count; omit (or pass null) to hide the indicator. */
online?: number | null;
showHotelName?: boolean;
}) {
return (
<Reveal>
@@ -71,14 +70,6 @@ export function AuthTopBar({
/>
</div>
)}
{showHotelName ? (
<span
className="hidden truncate text-sm font-extrabold uppercase tracking-wide sm:inline"
style={{ color: "var(--color-text-readable)" }}
>
{hotelName}
</span>
) : null}
</div>
<div
className="flex items-center gap-1 sm:gap-1.5 rounded-full px-1.5 py-1 sm:px-2"
@@ -108,7 +99,7 @@ export function AuthTopBar({
color: "var(--color-primary-readable, var(--color-primary))",
}}
>
<LiveOnlineCounter initial={online} />
<LiveOnlineCount initial={online} hotelName={hotelName} />
</span>
</span>
)}