fix(review): address CodeRabbit feedback

- swap direct i18next t imports for the useTranslation hook so the four
  touched components re-render on language change
- localize the buffer seconds unit via a buffer_seconds key instead of a
  literal trailing s
- reword the useAppRouter guard comment to match its real scope
This commit is contained in:
Gauvino
2026-06-12 15:00:49 +02:00
parent 2af252d639
commit 3247bf709c
7 changed files with 17 additions and 10 deletions

View File

@@ -31,9 +31,10 @@ export function useAppRouter() {
const push = useCallback(
(href: Parameters<typeof router.push>[0]) => {
// Duplicate-screen guard: a push blurs the source screen synchronously in
// the navigation state (only the native render is slow). A second tap then
// sees an unfocused screen and is dropped. Resets automatically on return.
// Rapid-push guard: a push blurs the source screen synchronously in the
// navigation state (only the native render is slow). Any further push from
// this screen — duplicate or not — is dropped until focus returns, so taps
// fired before the pushed screen renders can't stack screens.
// No navigation context => nothing to guard (deep-link pushes from root).
if (navigation?.isFocused?.() === false) return;
if (typeof href === "string") {