Fix double scrolling when clicking on announcement index buttons

This commit is contained in:
Lim Chee Aun 2023-05-12 11:57:10 +08:00
parent 9bb66e57ae
commit 2b5eb87ec4

View file

@ -253,7 +253,10 @@ function Notifications() {
onClick={() => {
announcementsListRef.current?.children[
index
].scrollIntoView({ behavior: 'smooth' });
].scrollIntoView({
behavior: 'smooth',
block: 'nearest',
});
}}
>
{index + 1}