fix: localization for "go back home" button on error page#1470
fix: localization for "go back home" button on error page#1470ghostdevv merged 3 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThe pull request updates the error view component to use dynamic translation lookup for a button label. The button previously displayed static text "go home" and now references a translation key Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ghostdevv
left a comment
There was a problem hiding this comment.
I removed the cursor changes since in #1074 I believe we've decided to only use cursor-pointer on links which is the browser default behavior 🙏 If there is a link that is missing cursor-pointer you could make a PR to fix the underlying cause?
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/error.vue (1)
54-60:⚠️ Potential issue | 🟡 MinorMissing
cursor-pointerclass mentioned in PR objectives.The PR description states that
cursor-pointerwas added to the "Go back home" button, but this class is not present on line 56. Without it, the cursor may not change to a pointer on hover, which was the original issue this PR aimed to fix.,
🔧 Proposed fix to add cursor-pointer
<button type="button" - class="font-mono text-sm px-6 py-3 bg-fg text-bg rounded-lg transition-all duration-200 hover:bg-fg/90 active:scale-95" + class="cursor-pointer font-mono text-sm px-6 py-3 bg-fg text-bg rounded-lg transition-all duration-200 hover:bg-fg/90 active:scale-95" `@click`="handleError" >
Do you mean to add |
Ah, I mean like we can add it if we find it's missing I think? I would've merged it tbf if I was more sure, but I think that the i18n was important to get in soon. Maybe you can make another PR to add the cursor-pointer to linkbase if we want to be sure? I'll then get a review from Alex maybe |
Changes
Addedcursor-pointerto the "Go back home" button inapp/error.vue.$t('common.go_back_home')(if available).Addedcursor-pointertoNuxtLinkinBase.vueto ensure consistent button-like link behavior.Verification
Before (current behavior – not working as expected):
npmx.dev/non-existent-pagepointerAfter (with this fix):
npmx.dev/non-existent-pagepointerand navigation works correctly