fix: Fixes extra bottom padding in account modal
This commit is contained in:
@@ -11,6 +11,7 @@ import { useMediaQuery, MutuallyExclusiveMediaQueryBreakpoints } from '@/Hooks/u
|
|||||||
import { SupportsPassiveListeners } from '@/Constants/Constants'
|
import { SupportsPassiveListeners } from '@/Constants/Constants'
|
||||||
import { useLifecycleAnimation } from '@/Hooks/useLifecycleAnimation'
|
import { useLifecycleAnimation } from '@/Hooks/useLifecycleAnimation'
|
||||||
import { getScrollParent } from '@/Utils'
|
import { getScrollParent } from '@/Utils'
|
||||||
|
import { useAvailableSafeAreaPadding } from '@/Hooks/useSafeAreaPadding'
|
||||||
|
|
||||||
const DisableScroll = () => {
|
const DisableScroll = () => {
|
||||||
useDisableBodyScrollOnMobile()
|
useDisableBodyScrollOnMobile()
|
||||||
@@ -63,6 +64,8 @@ const MobilePopoverContent = ({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const { hasBottomInset } = useAvailableSafeAreaPadding()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!element) {
|
if (!element) {
|
||||||
return
|
return
|
||||||
@@ -181,7 +184,8 @@ const MobilePopoverContent = ({
|
|||||||
<div
|
<div
|
||||||
ref={mergeRefs([setPopoverElement, addCloseMethod])}
|
ref={mergeRefs([setPopoverElement, addCloseMethod])}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'z-1 absolute bottom-0 flex max-h-[calc(100%_-_max(var(--safe-area-inset-top),2rem))] min-h-[40%] w-full flex-col rounded-t-xl bg-passive-5 pb-safe-bottom',
|
'z-1 absolute bottom-0 flex max-h-[calc(100%_-_max(var(--safe-area-inset-top),2rem))] min-h-[40%] w-full flex-col rounded-t-xl bg-passive-5',
|
||||||
|
hasBottomInset && 'pb-safe-bottom',
|
||||||
forceFullHeightOnMobile && 'h-full',
|
forceFullHeightOnMobile && 'h-full',
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user