Stream.tsx: fix auto-scroll
This commit is contained in:
parent
4dd2d20766
commit
4c0077da57
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ export function Stream({surah, stream}: StreamProps) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const el: HTMLElement = document.querySelector("ul.stream");
|
const el: HTMLElement = document.querySelector("ul.stream");
|
||||||
el.scroll({top: el.offsetHeight, behavior: "smooth"});
|
el.scroll({top: el.offsetHeight * stream.length, behavior: "smooth"});
|
||||||
}, [stream]);
|
}, [stream]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue