diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index 6ace60ded0..7b3077e2b8 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -1,12 +1,9 @@ -import {forwardRef, memo, useContext, useMemo} from 'react' +import {memo, useContext, useMemo} from 'react' import { ScrollView, type ScrollViewProps, -<<<<<<< HEAD type StyleProp, -======= StyleSheet, ->>>>>>> c74c5a431 (Revert "rm stylesheet") View, type ViewProps, type ViewStyle, @@ -66,51 +63,48 @@ export const Screen = memo(function Screen({ }) export type ContentProps = ScrollViewProps & { + ref?: React.Ref ignoreTabletLayoutOffset?: boolean } /** * Default scroll view for simple pages */ -export const Content = memo( - forwardRef(function Content( - { - children, - style, - contentContainerStyle, - ignoreTabletLayoutOffset, - ...props - }, - ref, - ) { - const t = useTheme() - const {footerHeight} = useShellLayout() +export const Content = memo(function Content({ + ref, + children, + style, + contentContainerStyle, + ignoreTabletLayoutOffset, + ...props +}: ContentProps) { + const t = useTheme() + const {footerHeight} = useShellLayout() - return ( - - {IS_WEB ? ( -
- {children} -
- ) : ( - children - )} -
- ) - }), -) + return ( + + {IS_WEB ? ( +
+ {children} +
+ ) : ( + children + )} +
+ ) +}) const scrollViewStyles = StyleSheet.create({ common: { @@ -142,7 +136,7 @@ export const KeyboardAwareContent = memo(function LayoutKeyboardAwareContent({ scrollIndicatorInsets={{bottom: footerHeight, top: 0, right: 1}} contentInset={ios({top: 0, left: 0, bottom: footerHeight, right: 0})} contentContainerStyle={[ - !isIOS && {paddingBottom: footerHeight}, + !IS_IOS && {paddingBottom: footerHeight}, contentContainerStyle, ]} keyboardShouldPersistTaps="handled"