mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
scroll to error only when route is focused
This commit is contained in:
parent
bd6b177f7f
commit
948ff51d3b
1 changed files with 1 additions and 1 deletions
|
|
@ -238,7 +238,7 @@ const Intro = ({ queryParams }) => {
|
|||
}
|
||||
}, [queryParams]);
|
||||
React.useEffect(() => {
|
||||
if (typeof state.error === 'string' && state.error.length > 0) {
|
||||
if (routeFocused && typeof state.error === 'string' && state.error.length > 0) {
|
||||
errorRef.current.scrollIntoView();
|
||||
}
|
||||
}, [state.error]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue