Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/components/error-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,11 @@ export function ErrorPage({
<p className="mt-3 max-w-md text-[0.9375rem] leading-relaxed text-fd-muted-foreground">{message}</p>
<div className="mt-6 flex flex-wrap justify-center gap-2">
{/*
A real navigation rather than a reload handler. This component renders
Real navigations rather than a reload handler. This component renders
inside a boundary that may itself have failed to hydrate, and an
anchor works with no JavaScript running at all.
anchor works with no JavaScript running at all. The primary action
comes last, on the right, as on the console and the website.
*/}
<a
href={primaryHref}
className="inline-flex h-8 items-center rounded-md bg-fd-primary px-3 text-[0.8125rem] font-medium text-fd-primary-foreground transition-opacity duration-150 hover:opacity-85"
>
{primaryLabel}
</a>
{secondaryHref && secondaryLabel ? (
<a
href={secondaryHref}
Expand All @@ -52,6 +47,12 @@ export function ErrorPage({
{secondaryLabel}
</a>
) : null}
<a
href={primaryHref}
className="inline-flex h-8 items-center rounded-md bg-fd-primary px-3 text-[0.8125rem] font-medium text-fd-primary-foreground transition-opacity duration-150 hover:opacity-85"
>
{primaryLabel}
</a>
</div>
</div>
);
Expand Down
32 changes: 9 additions & 23 deletions src/status/components/status-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,18 @@ export function StatusError({ error }: ErrorComponentProps) {
);
}

/** An unknown path on the status page. It had none of its own before. */
/** An unknown path on the status page. */
export function StatusNotFound() {
return (
<HomeLayout {...baseOptions()}>
<div className="mx-auto flex w-full max-w-3xl grow flex-col items-center justify-center px-4 py-20 text-center">
<h1 className="text-2xl font-semibold tracking-tight text-fd-foreground sm:text-3xl">
Page not found
</h1>
<p className="mt-3 max-w-md text-sm text-fd-muted-foreground">
This site carries the current status of Marfa and nothing else.
</p>
<div className="mt-6 flex flex-wrap justify-center gap-3">
<a
href="/"
className="rounded-lg bg-fd-primary px-4 py-2 text-sm font-medium text-fd-primary-foreground hover:opacity-90"
>
Current status
</a>
<a
href={DOCS_URL}
className="rounded-lg border border-fd-border px-4 py-2 text-sm font-medium text-fd-foreground hover:bg-fd-accent"
>
Documentation
</a>
</div>
</div>
<ErrorPage
title="Page not found"
message="This site carries the current status of Marfa and nothing else."
primaryHref="/"
primaryLabel="Current status"
secondaryHref={DOCS_URL}
secondaryLabel="Documentation"
/>
</HomeLayout>
);
}
Loading