Repository navigation
fix(frontend): improve 404 page with auth-aware links and i18n - #437
Merged
Merged
Conversation
…xx#356) - Rewrite not-found.tsx as a client component - Add prominent Browse Listings CTA for all users - Show Sell an asset and View your wallet CTAs for authenticated users - Show sign-in and create-account quick-links for guests - Translate all text via next-intl under the NotFound namespace - Add NotFound translations to all four locales: en, yo, ig, ha - Consistent Tailwind styling with dark mode support throughout
|
@Huncho-jack20 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The 404 page displayed a generic "page not found" message with no
actionable next steps. Users arriving from a broken link, an expired
trade URL, or a typo had no clear path forward, increasing bounce rate.
Changes
frontend/app/not-found.tsx
"use client"componentso it can consume auth state and translated strings at runtime.
useAuth()to detect whether the visitor is signed in.useTranslations("NotFound")from next-intl so all copyis served in the active locale.
View your wallet CTAs directly on the page.
Create account and Sign in instead of wallet/profile links.
isLoadingresolution to prevent aflash of incorrect UI during the auth hydration tick.
<a>tags with Next.js<Link>for client-sidenavigation.
classes, full dark mode support (
dark:variants), and accessiblefocus rings (
focus-visible:ring-*).frontend/locales/en/common.json
frontend/locales/yo/common.json
frontend/locales/ig/common.json
frontend/locales/ha/common.json
"NotFound"namespace to all four locale files.heading,body,browseListings,sellAsset,viewWallet,youMightBeLookingFor,marketplace,sellAirtime,createAccount,signIn,copyright,github.the tone and vocabulary already established in those locale files.
Acceptance criteria checklist
Testing
/abc) while logged out → seeBrowse Listings + Sell an asset CTAs; quick-links include Sign in and
Create account.
View your wallet CTAs; quick-links show Marketplace, Sell airtime,
View your wallet.
/yo/abc,/ig/abc,/ha/abc→ all text rendersin the correct language.
Closes #356
closes #358
closes #355
closes #296