From eacd1cbe2af2446140a8a05140e89941f779c2ff Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 20 Mar 2024 17:11:59 +0000 Subject: [PATCH] use alf for splashscreen (web) --- src/view/com/auth/SplashScreen.web.tsx | 215 ++++++++++--------------- 1 file changed, 86 insertions(+), 129 deletions(-) diff --git a/src/view/com/auth/SplashScreen.web.tsx b/src/view/com/auth/SplashScreen.web.tsx index f1921c7ffb..7e5ddaffb8 100644 --- a/src/view/com/auth/SplashScreen.web.tsx +++ b/src/view/com/auth/SplashScreen.web.tsx @@ -1,13 +1,9 @@ import React from 'react' -import {StyleSheet, TouchableOpacity, View, Pressable} from 'react-native' +import {View, Pressable} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' -import {Text} from 'view/com/util/text/Text' import {TextLink} from '../util/Link' import {ErrorBoundary} from 'view/com/util/ErrorBoundary' -import {s, colors} from 'lib/styles' -import {usePalette} from 'lib/hooks/usePalette' import {CenteredView} from '../util/Views' -import {isWeb} from 'platform/detection' import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' import {Trans, msg} from '@lingui/macro' import {Logo} from '#/view/icons/Logo' @@ -16,6 +12,10 @@ import {useLingui} from '@lingui/react' import {sanitizeAppLanguageSetting} from '#/locale/helpers' import {useLanguagePrefs, useLanguagePrefsApi} from '#/state/preferences' import {APP_LANGUAGES} from '#/locale/languages' +import {atoms as a, useTheme} from '#/alf' +import {Button, ButtonText} from '#/components/Button' +import {ChevronBottom_Stroke2_Corner0_Rounded as ChevronDown} from '#/components/icons/Chevron' +import {Text} from '#/components/Typography' export const SplashScreen = ({ onDismiss, @@ -26,10 +26,9 @@ export const SplashScreen = ({ onPressSignin: () => void onPressCreateAccount: () => void }) => { - const pal = usePalette('default') - const {isTabletOrMobile} = useWebMediaQueries() - const styles = useStyles() - const isMobileWeb = isWeb && isTabletOrMobile + const {_} = useLingui() + const t = useTheme() + const {isTabletOrMobile: isMobileWeb} = useWebMediaQueries() return ( <> @@ -48,61 +47,89 @@ export const SplashScreen = ({ icon="x" size={24} style={{ - color: String(pal.text.color), + color: String(t.atoms.text.color), }} /> )} - + - + + - - + + + + + + What's up? + - - + + -