From 270d55e6a6e11ae436a672be02ebc63981772f0d Mon Sep 17 00:00:00 2001 From: mrhid6 Date: Tue, 25 Aug 2026 14:11:21 +0000 Subject: [PATCH] feat: Updated status page title --- web/app/status/[pageId]/page.tsx | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/web/app/status/[pageId]/page.tsx b/web/app/status/[pageId]/page.tsx index 3b99d10..d12ad03 100644 --- a/web/app/status/[pageId]/page.tsx +++ b/web/app/status/[pageId]/page.tsx @@ -7,10 +7,7 @@ import type { StatusSnapshot } from "@/lib/api"; // auth redirect. This page is served to the public. export const dynamic = "force-dynamic"; -type FetchResult = - | { kind: "ok"; snapshot: StatusSnapshot } - | { kind: "not-found" } - | { kind: "unavailable" }; +type FetchResult = { kind: "ok"; snapshot: StatusSnapshot } | { kind: "not-found" } | { kind: "unavailable" }; /* * The control plane this call is made to is the visitor's own host. @@ -27,7 +24,6 @@ function apiBase(proto: string, host: string): string { } async function fetchSnapshot(base: string, host: string, forwardedFor: string, pageId: string): Promise { - // The instance is resolved server-side from the visitor's host, so it has // to be forwarded explicitly — this is a server-to-server call and its own // Host names the Go service. @@ -93,34 +89,23 @@ function unavailableSnapshot(): StatusSnapshot { }; } -export default async function PublicStatusPage({ - params, -}: { - params: Promise<{ pageId: string }>; -}) { +export default async function PublicStatusPage({ params }: { params: Promise<{ pageId: string }> }) { const { pageId } = await params; const h = await headers(); const host = h.get("x-forwarded-host") ?? h.get("host") ?? ""; const inboundFor = h.get("x-forwarded-for"); const peer = h.get("x-real-ip"); - const forwardedFor = [inboundFor, inboundFor ? null : peer] - .filter((v): v is string => !!v) - .join(", "); + const forwardedFor = [inboundFor, inboundFor ? null : peer].filter((v): v is string => !!v).join(", "); const proto = h.get("x-forwarded-proto")?.split(",")[0].trim() || "https"; const result = await fetchSnapshot(apiBase(proto, host), host, forwardedFor, pageId); if (result.kind === "not-found") notFound(); - return ( - - ); + return ; } export async function generateMetadata({ params }: { params: Promise<{ pageId: string }> }) { const { pageId } = await params; - return { title: `Status — ${pageId}` }; + return { title: `Status: ${pageId}` }; }