fix: 🐛
This commit is contained in:
@@ -31,14 +31,14 @@ export default function NewNotesButton({
|
|||||||
{newEvents.length > 0 && (
|
{newEvents.length > 0 && (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'w-full flex justify-center z-40',
|
'w-full flex justify-center z-40 pointer-events-none',
|
||||||
isSmallScreen ? 'fixed' : 'absolute bottom-4'
|
isSmallScreen ? 'fixed' : 'absolute bottom-4'
|
||||||
)}
|
)}
|
||||||
style={isSmallScreen ? { bottom: 'calc(4rem + env(safe-area-inset-bottom))' } : undefined}
|
style={isSmallScreen ? { bottom: 'calc(4rem + env(safe-area-inset-bottom))' } : undefined}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
onClick={onClick}
|
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 && (
|
{pubkeys.length > 0 && (
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
|
|||||||
@@ -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>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user