Skip to content

Commit

Permalink
fix safeAreaPaddingBottomStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Nov 28, 2024
1 parent 73cee7a commit f08991f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hooks/useStyledSafeAreaInsets.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {useContext} from 'react';
import {useContext, useMemo} from 'react';
import {ScreenWrapperStatusContext} from '@components/ScreenWrapper';
import useSafeAreaInsets from './useSafeAreaInsets';
import useStyleUtils from './useStyleUtils';
Expand Down Expand Up @@ -38,11 +38,13 @@ function useStyledSafeAreaInsets() {
};
const adaptedPaddingBottom = isSafeAreaBottomPaddingApplied ? 0 : paddingBottom;

const safeAreaPaddingBottomStyle = useMemo(() => ({paddingBottom: adaptedPaddingBottom}), [adaptedPaddingBottom]);

return {
paddingTop: isSafeAreaTopPaddingApplied ? 0 : paddingTop,
paddingBottom: adaptedPaddingBottom,
insets: adaptedInsets,
safeAreaPaddingBottomStyle: {adaptedPaddingBottom},
safeAreaPaddingBottomStyle,
};
}

Expand Down

0 comments on commit f08991f

Please sign in to comment.