fix: 🐛

This commit is contained in:
codytseng
2025-04-15 23:07:28 +08:00
parent 3c81a13acb
commit a393a5eb7a
2 changed files with 2 additions and 24 deletions

View File

@@ -31,14 +31,14 @@ export default function NewNotesButton({
{newEvents.length > 0 && (
<div
className={cn(
'w-full flex justify-center z-40',
'w-full flex justify-center z-40 pointer-events-none',
isSmallScreen ? 'fixed' : 'absolute bottom-4'
)}
style={isSmallScreen ? { bottom: 'calc(4rem + env(safe-area-inset-bottom))' } : undefined}
>
<Button
onClick={onClick}
className="group rounded-full h-fit pl-2 pr-3 hover:bg-primary-hover"
className="group rounded-full h-fit pl-2 pr-3 hover:bg-primary-hover pointer-events-auto"
>
{pubkeys.length > 0 && (
<div className="flex items-center">

View File

@@ -1,22 +0,0 @@
import { Button } from '@/components/ui/button'
import { cn } from '@/lib/utils'
import { useDeepBrowsing } from '@/providers/DeepBrowsingProvider'
import { useTranslation } from 'react-i18next'
export function ShowNewButton({ onClick }: { onClick: () => void }) {
const { t } = useTranslation()
const { deepBrowsing, lastScrollTop } = useDeepBrowsing()
return (
<div
className={cn(
'sticky top-[6.25rem] flex justify-center w-full my-2 z-30 duration-700 transition-transform',
deepBrowsing && lastScrollTop > 800 ? '-translate-y-10' : ''
)}
>
<Button size="lg" onClick={onClick} className="drop-shadow-xl shadow-primary/50">
{t('show new notes')}
</Button>
</div>
)
}