Skip to content

fix: resolve unresponsive Go Back Home button on 404 page in production #1869

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
12 changes: 8 additions & 4 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import Link from 'next/link';
import { Button } from '../components/ui/button';

const NotFound = () => {
return (
Expand All @@ -12,9 +11,14 @@ const NotFound = () => {
<p className="mb-8 text-lg text-muted-foreground md:text-xl">
Oops! The page you're looking for doesn't exist.
</p>
<Button asChild size="lg">
<Link href="/">Go Back Home</Link>
</Button>

{/* Simplified approach to avoid hydration issues */}
<Link
href="/"
className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground dark:text-neutral-950 hover:bg-primary/90 h-11 rounded-md px-8"
>
Go Back Home
</Link>
</main>
</div>
);
Expand Down