fix: 🐛

This commit is contained in:
codytseng
2025-01-26 20:19:18 +08:00
parent 2873b9bdd8
commit 8ef1afc4b9
5 changed files with 37 additions and 15 deletions

View File

@@ -240,13 +240,13 @@ function ListModeSwitch({
setListMode: (listMode: TNoteListMode) => void
}) {
const { t } = useTranslation()
const { deepBrowsing } = useDeepBrowsing()
const { deepBrowsing, lastScrollTop } = useDeepBrowsing()
return (
<div
className={cn(
'sticky top-12 bg-background z-10 duration-700 transition-transform',
deepBrowsing ? '-translate-y-[calc(100%+12rem)]' : ''
deepBrowsing && lastScrollTop > 800 ? '-translate-y-[calc(100%+12rem)]' : ''
)}
>
<div className="flex">