Skip to content

Comments

fix: localization for "go back home" button on error page#1470

Merged
ghostdevv merged 3 commits intonpmx-dev:mainfrom
Adebesin-Cell:fix/404-button
Feb 13, 2026
Merged

fix: localization for "go back home" button on error page#1470
ghostdevv merged 3 commits intonpmx-dev:mainfrom
Adebesin-Cell:fix/404-button

Conversation

@Adebesin-Cell
Copy link
Contributor

@Adebesin-Cell Adebesin-Cell commented Feb 13, 2026

Changes

  • Added cursor-pointer to the "Go back home" button in app/error.vue.
  • Replaced hardcoded text with $t('common.go_back_home') (if available).
  • Added cursor-pointer to NuxtLink in Base.vue to ensure consistent button-like link behavior.

Verification

Before (current behavior – not working as expected):

  • Navigate to npmx.dev/non-existent-page
  • Hover over the "Go back home" button
  • Cursor does not change to pointer

After (with this fix):

  • Navigate to npmx.dev/non-existent-page
  • Hover over the "Go back home" button
  • Cursor changes to pointer and navigation works correctly

@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 13, 2026 4:59pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 13, 2026 4:59pm
npmx-lunaria Ignored Ignored Feb 13, 2026 4:59pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

The 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 {{ $t('common.go_back_home') }}. The underlying click handler and control flow remain unchanged, with the button still invoking the handleError method. This is a minimal change affecting a single line of code with no modifications to exported or public entity declarations.

Suggested reviewers

  • 43081j
  • whitep4nth3r
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main
Description check ✅ Passed The pull request description clearly describes changes related to the changeset, including localization updates and cursor styling for the error page button.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@ghostdevv ghostdevv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@ghostdevv ghostdevv changed the title Fix: Cursor Pointer & Localization for "Go back home" Button fix: localization for "go back home" button on error page Feb 13, 2026
@ghostdevv ghostdevv enabled auto-merge February 13, 2026 16:59
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟡 Minor

Missing cursor-pointer class mentioned in PR objectives.

The PR description states that cursor-pointer was 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"
       >

@ghostdevv ghostdevv added this pull request to the merge queue Feb 13, 2026
Merged via the queue into npmx-dev:main with commit 49a8473 Feb 13, 2026
18 of 19 checks passed
@Adebesin-Cell
Copy link
Contributor Author

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?

Do you mean to add cursor-pointer to links that might have been missed?

@ghostdevv
Copy link
Contributor

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?

Do you mean to add cursor-pointer to links that might have been missed?

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

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.

2 participants