feat: scroll to top when jumping to the current page
This commit is contained in:
parent
82537f192b
commit
23bf7fd005
23 changed files with 235 additions and 132 deletions
|
|
@ -1,11 +1,13 @@
|
|||
import NotificationList from '@/components/NotificationList'
|
||||
import PrimaryPageLayout from '@/layouts/PrimaryPageLayout'
|
||||
import { Bell } from 'lucide-react'
|
||||
import { forwardRef } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export default function NotificationListPage() {
|
||||
const NotificationListPage = forwardRef((_, ref) => {
|
||||
return (
|
||||
<PrimaryPageLayout
|
||||
ref={ref}
|
||||
pageName="notifications"
|
||||
titlebar={<NotificationListPageTitlebar />}
|
||||
displayScrollToTopButton
|
||||
|
|
@ -15,7 +17,9 @@ export default function NotificationListPage() {
|
|||
</div>
|
||||
</PrimaryPageLayout>
|
||||
)
|
||||
}
|
||||
})
|
||||
NotificationListPage.displayName = 'NotificationListPage'
|
||||
export default NotificationListPage
|
||||
|
||||
function NotificationListPageTitlebar() {
|
||||
const { t } = useTranslation()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue