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

Conversation

Rohanpawar9921
Copy link

PR Fixes:

  • Fixed unresponsive "Go Back Home" button on 404 page in production environments
  • Resolved hydration mismatch issues caused by complex Button + asChild component chain
  • Replaced Radix UI Button component with direct Link to eliminate client-server rendering inconsistencies
  • Maintained identical visual styling and user experience while improving reliability

Root Cause: The original implementation used <Button asChild><Link href="/"> which created a complex component chain (Button → Slot → Link) that caused hydration mismatches in production. The server-rendered HTML differed from client-side React rendering, preventing proper event handler attachment.

Solution: Simplified the component structure by using a direct <Link> element with inline button styling classes, eliminating the hydration-prone component composition while preserving the exact same appearance and functionality.

Technical Details:

  • Removed dependency on @radix-ui/react-slot for this component
  • Applied button variant classes directly to Link component
  • Ensured consistent server-side and client-side rendering
  • No breaking changes to existing functionality or visual design

Resolves #1868

Checklist before requesting a review

  • I have performed a self-review of my code
  • I assure there is no similar/duplicate pull request regarding same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug:The "Go Back Home" button on the 404 (Not Found) page is completely unresponsive in production environments.
1 participant