diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-03-22 13:49:19 +0000 |
---|---|---|
committer | Samuel Newman <mozzius@protonmail.com> | 2024-03-22 13:49:19 +0000 |
commit | 4ec434926e70e90cdca3e5f3205b834c62859dde (patch) | |
tree | f75650c9a6c17fb634581ddbc3c2b2f777f35158 /src/screens/Login | |
parent | 6f2dfcb5029faf4ff09d529a8bf6bfe241e31b2d (diff) | |
download | voidsky-4ec434926e70e90cdca3e5f3205b834c62859dde.tar.zst |
move auth flows scrollview to loggedin layout
Diffstat (limited to 'src/screens/Login')
-rw-r--r-- | src/screens/Login/FormContainer.tsx | 41 | ||||
-rw-r--r-- | src/screens/Login/index.tsx | 6 |
2 files changed, 15 insertions, 32 deletions
diff --git a/src/screens/Login/FormContainer.tsx b/src/screens/Login/FormContainer.tsx index e28b48b40..0144a8b5b 100644 --- a/src/screens/Login/FormContainer.tsx +++ b/src/screens/Login/FormContainer.tsx @@ -1,13 +1,6 @@ import React from 'react' -import { - ScrollView, - type StyleProp, - StyleSheet, - View, - type ViewStyle, -} from 'react-native' +import {type StyleProp, View, type ViewStyle} from 'react-native' -import {isWeb} from '#/platform/detection' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Text} from '#/components/Typography' @@ -16,38 +9,24 @@ export function FormContainer({ title, children, style, - contentContainerStyle, }: { testID?: string title?: React.ReactNode children: React.ReactNode style?: StyleProp<ViewStyle> - contentContainerStyle?: StyleProp<ViewStyle> }) { const {gtMobile} = useBreakpoints() const t = useTheme() return ( - <ScrollView + <View testID={testID} - style={[styles.maxHeight, contentContainerStyle]} - keyboardShouldPersistTaps="handled"> - <View - style={[a.gap_md, a.flex_1, !gtMobile && [a.px_lg, a.pt_md], style]}> - {title && !gtMobile && ( - <Text style={[a.text_xl, a.font_bold, t.atoms.text_contrast_high]}> - {title} - </Text> - )} - {children} - </View> - </ScrollView> + style={[a.gap_md, a.flex_1, !gtMobile && [a.px_lg, a.py_md], style]}> + {title && !gtMobile && ( + <Text style={[a.text_xl, a.font_bold, t.atoms.text_contrast_high]}> + {title} + </Text> + )} + {children} + </View> ) } - -const styles = StyleSheet.create({ - maxHeight: { - // @ts-ignore web only -prf - maxHeight: isWeb ? '100vh' : undefined, - height: !isWeb ? '100%' : undefined, - }, -}) diff --git a/src/screens/Login/index.tsx b/src/screens/Login/index.tsx index 49f7518b0..1fce63d29 100644 --- a/src/screens/Login/index.tsx +++ b/src/screens/Login/index.tsx @@ -164,7 +164,11 @@ export const Login = ({onPressBack}: {onPressBack: () => void}) => { return ( <KeyboardAvoidingView testID="signIn" behavior="padding" style={a.flex_1}> - <LoggedOutLayout leadin="" title={title} description={description}> + <LoggedOutLayout + leadin="" + title={title} + description={description} + scrollable> <LayoutAnimationConfig skipEntering skipExiting> <ScreenTransition key={currentForm}>{content}</ScreenTransition> </LayoutAnimationConfig> |