diff --git a/src/screens/Onboarding/Layout.tsx b/src/screens/Onboarding/Layout.tsx index 15c300fed8..63da1db66f 100644 --- a/src/screens/Onboarding/Layout.tsx +++ b/src/screens/Onboarding/Layout.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import React, {useState} from 'react' import {ScrollView, View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {msg} from '@lingui/macro' @@ -12,6 +12,7 @@ import { flatten, native, type TextStyleProp, + tokens, useBreakpoints, useTheme, web, @@ -46,6 +47,8 @@ export function Layout({children}: React.PropsWithChildren<{}>) { const paddingTop = gtMobile ? a.py_5xl : a.py_lg const dialogLabel = _(msg`Set up your account`) + const [footerHeight, setFooterHeight] = useState(0) + return ( ) { ref={scrollview} style={[a.h_full, a.w_full, {paddingTop: insets.top}]} contentContainerStyle={{borderWidth: 0}} + scrollIndicatorInsets={{bottom: footerHeight - insets.bottom}} // @ts-ignore web only --prf dataSet={{'stable-gutters': 1}}> + style={[ + a.flex_row, + a.justify_center, + gtMobile ? a.px_5xl : a.px_xl, + a.debug, + ]}> ) { ]}> {Array(state.totalSteps) .fill(0) - .map((_, i) => ( + .map((__, i) => ( ) { {children} - + setFooterHeight(evt.nativeEvent.layout.height)} style={[ // @ts-ignore web only -prf isWeb ? a.fixed : a.absolute, @@ -167,8 +177,8 @@ export function Layout({children}: React.PropsWithChildren<{}>) { isWeb ? a.py_2xl : { - paddingTop: a.pt_lg.paddingTop, - paddingBottom: insets.bottom + 10, + paddingTop: tokens.space.md, + paddingBottom: insets.bottom + tokens.space.md, }, ]}> (null) + const saveInterests = useCallback(async () => { setSaving(true) @@ -48,46 +44,17 @@ export function StepSuggestedAccounts() { const isError = false - const title = isError ? ( - Oh no! Something went wrong. - ) : ( - Suggested Accounts - ) - const description = isError ? ( - - We weren't able to connect. Please try again to continue setting up your - account. If it continues to fail, you can skip this flow. - - ) : ( - We'll use this to help customize your experience. - ) - return ( - + Suggested Accounts + + + - {title} - {description} - - - {isError ? (