refactor: page manager

This commit is contained in:
codytseng 2025-11-03 17:41:01 +08:00
parent 1b7ec56c89
commit 579385ce3d
13 changed files with 131 additions and 121 deletions

View file

@ -2,11 +2,12 @@ import HideUntrustedContentButton from '@/components/HideUntrustedContentButton'
import NotificationList from '@/components/NotificationList'
import PrimaryPageLayout from '@/layouts/PrimaryPageLayout'
import { usePrimaryPage } from '@/PageManager'
import { TPageRef } from '@/types'
import { Bell } from 'lucide-react'
import { forwardRef, useEffect, useRef } from 'react'
import { useTranslation } from 'react-i18next'
const NotificationListPage = forwardRef((_, ref) => {
const NotificationListPage = forwardRef<TPageRef>((_, ref) => {
const { current } = usePrimaryPage()
const firstRenderRef = useRef(true)
const notificationListRef = useRef<{ refresh: () => void }>(null)