feat: explore (#85)

This commit is contained in:
Cody Tseng 2025-02-11 16:33:31 +08:00 committed by GitHub
parent 80893ec033
commit b91f46723e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 811 additions and 179 deletions

View file

@ -16,7 +16,7 @@ const PrimaryPageLayout = forwardRef(
displayScrollToTopButton = false
}: {
children?: React.ReactNode
titlebar?: React.ReactNode
titlebar: React.ReactNode
pageName: TPrimaryPageName
displayScrollToTopButton?: boolean
},
@ -54,11 +54,11 @@ const PrimaryPageLayout = forwardRef(
paddingBottom: 'calc(env(safe-area-inset-bottom) + 3rem)'
}}
>
{titlebar && <PrimaryPageTitlebar>{titlebar}</PrimaryPageTitlebar>}
<PrimaryPageTitlebar>{titlebar}</PrimaryPageTitlebar>
{children}
{displayScrollToTopButton && <ScrollToTopButton />}
<BottomNavigationBar />
</div>
{displayScrollToTopButton && <ScrollToTopButton />}
</DeepBrowsingProvider>
)
}
@ -67,10 +67,10 @@ const PrimaryPageLayout = forwardRef(
<DeepBrowsingProvider active={current === pageName} scrollAreaRef={scrollAreaRef}>
<ScrollArea
className="h-screen overflow-auto"
scrollBarClassName="z-20 pt-12"
scrollBarClassName="z-50 pt-12"
ref={scrollAreaRef}
>
{titlebar && <PrimaryPageTitlebar>{titlebar}</PrimaryPageTitlebar>}
<PrimaryPageTitlebar>{titlebar}</PrimaryPageTitlebar>
{children}
<div className="h-4" />
</ScrollArea>