mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-12 17:00:23 +01:00
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:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user