Skip to content

Commit 748c450

Browse files
committed
Merge main into fix/images-performance
2 parents 858915d + 538dde9 commit 748c450

2 files changed

Lines changed: 23 additions & 35 deletions

File tree

src/components/DefaultCatchBoundary.tsx

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Button } from "@ethui/ui/components/shadcn/button";
12
import type { ErrorComponentProps } from "@tanstack/react-router";
23
import {
34
ErrorComponent,
@@ -6,7 +7,6 @@ import {
67
useMatch,
78
useRouter,
89
} from "@tanstack/react-router";
9-
import { Header } from "./header";
1010

1111
export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
1212
const router = useRouter();
@@ -20,7 +20,6 @@ export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
2020

2121
return (
2222
<div className="min-h-screen bg-white">
23-
<Header />
2423
<main className="container mx-auto flex min-h-[60vh] flex-col items-start justify-center gap-4 px-4 py-12 md:py-20">
2524
<p className="text-gray-500 text-sm uppercase tracking-wide">
2625
Something went wrong
@@ -34,33 +33,30 @@ export function DefaultCatchBoundary({ error }: ErrorComponentProps) {
3433
</p>
3534
{showErrorDetails && <ErrorComponent error={error} />}
3635
<div className="flex flex-wrap items-center gap-2">
37-
<button
36+
<Button
3837
type="button"
3938
onClick={() => {
4039
router.invalidate();
4140
}}
42-
className="rounded bg-gray-900 px-3 py-2 font-semibold text-sm text-white"
4341
>
4442
Try again
45-
</button>
43+
</Button>
4644
{isRoot ? (
47-
<Link
48-
to="/"
49-
className="rounded bg-gray-100 px-3 py-2 font-semibold text-gray-900 text-sm"
50-
>
51-
Home
52-
</Link>
45+
<Button asChild variant="secondary">
46+
<Link to="/">Home</Link>
47+
</Button>
5348
) : (
54-
<Link
55-
to="/"
56-
className="rounded bg-gray-100 px-3 py-2 font-semibold text-gray-900 text-sm"
57-
onClick={(e) => {
58-
e.preventDefault();
59-
window.history.back();
60-
}}
61-
>
62-
Go back
63-
</Link>
49+
<Button asChild variant="secondary">
50+
<Link
51+
to="/"
52+
onClick={(e) => {
53+
e.preventDefault();
54+
window.history.back();
55+
}}
56+
>
57+
Go back
58+
</Link>
59+
</Button>
6460
)}
6561
</div>
6662
</main>

src/components/NotFound.tsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import { Button } from "@ethui/ui/components/shadcn/button";
12
import { Link } from "@tanstack/react-router";
2-
import { Header } from "./header";
33

44
export function NotFound({ children }: { children?: any }) {
55
return (
66
<div className="min-h-screen bg-white">
7-
<Header />
87
<main className="container mx-auto flex min-h-[60vh] flex-col items-start justify-center gap-4 px-4 py-12 md:py-20">
98
<p className="text-gray-500 text-sm uppercase tracking-wide">
109
404 error
@@ -21,19 +20,12 @@ export function NotFound({ children }: { children?: any }) {
2120
)}
2221
</div>
2322
<div className="flex flex-wrap items-center gap-2">
24-
<button
25-
type="button"
26-
onClick={() => window.history.back()}
27-
className="rounded bg-emerald-600 px-3 py-2 font-semibold text-sm text-white"
28-
>
23+
<Button type="button" onClick={() => window.history.back()}>
2924
Go back
30-
</button>
31-
<Link
32-
to="/"
33-
className="rounded bg-gray-900 px-3 py-2 font-semibold text-sm text-white"
34-
>
35-
Home
36-
</Link>
25+
</Button>
26+
<Button asChild variant="secondary">
27+
<Link to="/">Home</Link>
28+
</Button>
3729
</div>
3830
</main>
3931
</div>

0 commit comments

Comments
 (0)