Scroll-to-top for Notifications

This commit is contained in:
Lim Chee Aun 2022-12-24 17:54:42 +08:00
parent c6b9e3fc78
commit 8eec844781

View file

@ -292,7 +292,11 @@ function Notifications() {
return ( return (
<div class="deck-container" ref={scrollableRef}> <div class="deck-container" ref={scrollableRef}>
<div class={`timeline-deck deck ${onlyMentions ? 'only-mentions' : ''}`}> <div class={`timeline-deck deck ${onlyMentions ? 'only-mentions' : ''}`}>
<header> <header
onClick={() => {
scrollableRef.current?.scrollTo({ top: 0, behavior: 'smooth' });
}}
>
<div class="header-side"> <div class="header-side">
<a href="#" class="button plain"> <a href="#" class="button plain">
<Icon icon="home" size="l" /> <Icon icon="home" size="l" />