Skip to content

temiport25: NavBar i18n + memoization - #855

Merged
usmanimamu17-create merged 2 commits into
ApexChainx:mainfrom
temiport25:temiport25/navbar-i18n-memoization
Oct 16, 2026
Merged

usmanimamu17-create merged 2 commits into
ApexChainx:mainfrom
temiport25:temiport25/navbar-i18n-memoization

Conversation

@temiport25

Copy link
Copy Markdown
Contributor

Internationalizes the remaining hard-coded NavBar copy (#805) and memoizes the component's computations (#807).

  • Add i18n translations for NavBar #805 i18n — the mainnet badge, the "Retry Queue" link and the "admin" role badge were hard-coded English. They now go through t('common.mainnet'), t('common.retryQueue') and t('common.admin') so all three locales cover them.
  • Memoize expensive computations in NavBar #807 memoization — the component is wrapped in React.memo; isAdmin is a useMemo derivation, handleLogout is a useCallback, and the public/admin link lists are useMemo-built so a parent layout re-render no longer re-computes them (proven in the test via the useSession call count).

Adds tests/navbar-i18n-memo.test.tsx (6 tests) with a t spy asserting the requested keys. Note: the i18n message bundles are corrupted in this checkout (binary), so the provider is mocked; repo-wide tsc/vitest failures are pre-existing and unrelated.

Closes #804
Closes #805
Closes #806
Closes #807

@drips-wave

drips-wave Bot commented Oct 16, 2026

Copy link
Copy Markdown

@temiport25 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! 🚀

Learn more about application limits

@usmanimamu17-create
usmanimamu17-create merged commit 5a5b905 into ApexChainx:main Oct 16, 2026
0 of 3 checks passed
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.

Memoize expensive computations in NavBar Add form validation to NavBar Add i18n translations for NavBar Add TypeScript strict typing to NavBar

2 participants