refactor: page manager
This commit is contained in:
parent
1b7ec56c89
commit
579385ce3d
13 changed files with 131 additions and 121 deletions
|
|
@ -2,24 +2,19 @@ import BookmarkList from '@/components/BookmarkList'
|
|||
import PrimaryPageLayout from '@/layouts/PrimaryPageLayout'
|
||||
import { TPageRef } from '@/types'
|
||||
import { BookmarkIcon } from 'lucide-react'
|
||||
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
const BookmarkPage = forwardRef((_, ref) => {
|
||||
const layoutRef = useRef<TPageRef>(null)
|
||||
useImperativeHandle(ref, () => layoutRef.current)
|
||||
|
||||
return (
|
||||
<PrimaryPageLayout
|
||||
pageName="bookmark"
|
||||
ref={layoutRef}
|
||||
titlebar={<BookmarkPageTitlebar />}
|
||||
displayScrollToTopButton
|
||||
>
|
||||
<BookmarkList />
|
||||
</PrimaryPageLayout>
|
||||
)
|
||||
})
|
||||
const BookmarkPage = forwardRef<TPageRef>((_, ref) => (
|
||||
<PrimaryPageLayout
|
||||
pageName="bookmark"
|
||||
ref={ref}
|
||||
titlebar={<BookmarkPageTitlebar />}
|
||||
displayScrollToTopButton
|
||||
>
|
||||
<BookmarkList />
|
||||
</PrimaryPageLayout>
|
||||
))
|
||||
BookmarkPage.displayName = 'BookmarkPage'
|
||||
export default BookmarkPage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue