diff --git a/app/_layout.tsx b/app/_layout.tsx index 40f5473..c908bc2 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -12,6 +12,7 @@ import { Onboarding } from '@/components/Onboarding'; import { SignUp } from '@/components/SignUp'; import { SignIn } from '@/components/SignIn'; import { HomeScreen } from '@/components/HomeScreen'; +import {SecureAccount} from '@/components/SecureAccount'; // import { useColorScheme } from '@/hooks/useColorScheme'; // const ONBOARDING_COMPLETE_KEY = 'onboarding_complete'; @@ -30,6 +31,8 @@ export default function RootLayout() { const [showSignUp, setShowSignUp] = useState(false); const [showSignIn, setShowSignIn] = useState(false); const [appIsReady, setAppIsReady] = useState(false); + const [showSecure, setShowSecure] = useState(true); + // Handle app state changes useEffect(() => { @@ -151,8 +154,19 @@ export default function RootLayout() { ); } + // Main app + if (showSecure) { + return ( + <> + + + + ); + } + + // Main app - using HomeScreen component instead of Stack navigation - return ( + return ( <> diff --git a/components/SecureAccount.tsx b/components/SecureAccount.tsx new file mode 100644 index 0000000..301a680 --- /dev/null +++ b/components/SecureAccount.tsx @@ -0,0 +1,203 @@ +import React, { useState } from 'react'; +import { View, Text, TouchableOpacity, StyleSheet, ScrollView } from 'react-native'; +import { useNavigation } from '@react-navigation/native'; +import AntDesign from '@expo/vector-icons/AntDesign'; + +export function SecureAccount() { + const [selectedOption, setSelectedOption] = useState<"biometric" | "phrase" | null>(null); + const navigation = useNavigation(); + + return ( + + navigation.goBack()}> + + + + Back + + + + Secure your account + + Add another layer to secure your KryptoSync account. + + + + + Don’t risk losing your funds. Protect your wallet by saving your Secret Recovery Phrase in a place you trust. It’s the only way to recover your wallet if you get locked out of the app or get a new device. + + + setSelectedOption('biometric')} + > + + + + + Secure my account using biometrics + Use face ID or fingerprint to secure this account. + + + + setSelectedOption('phrase')} + > + + + + + Secure my account using secret phrase + + Select or manually input a secret phrase when your account is recovered. + + + + + + + Secure account now + + + + + + Remind me later + + + + We highly recommend securing your account + + ); +}; + +const styles = StyleSheet.create({ + container: { + backgroundColor: '#0E1032', // dark background + paddingVertical: 60, + paddingHorizontal: 20, + flex: 1, + fontFamily: 'Montserrat', + }, + backButton: { + flexDirection: 'row', + alignItems: 'center', + gap: 8, + marginBottom: 20 + }, + iconContainer: { + backgroundColor: '#1A1A41', + borderRadius: 90, + justifyContent: 'center', + alignItems: 'center', + padding: 12 + }, + backText: { + color: '#FFFFFF', + fontSize: 16, + }, + headline: { + flexDirection: "column", + gap: 0 + }, + title: { + fontSize: 30, + fontWeight: 'bold', + color: '#fff', + }, + description: { + fontSize: 14, + color: '#FFFFFF', + marginBottom: 20, + }, + body: { + fontSize: 14, + color: '#FFFFFF', + marginBottom: 30, + lineHeight: 22, + }, + highlight: { + color: '#005EFF', + fontWeight: 'bold', // optional, if you want it to stand out more + }, + selectIndicator: { + borderRadius: 100, + backgroundColor: '#0E1032', + height: 40, + width: 40, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center' + }, + innerCircle: { + borderRadius: 100, + borderWidth: 2, + height: 25, + width: 25, + borderColor: '#9693A8', + }, + selectedInner: { + borderRadius: 100, + borderWidth: 2, + height: 25, + width: 25, + borderColor: '#9693A8', + backgroundColor: '#2D52EC' + }, + optionContainer: { + backgroundColor: '#1A1A41', + borderColor: '#2D52EC', + marginBottom: 20, + paddingHorizontal: 12, + paddingVertical: 10, + borderWidth: 0.5, + borderRadius: 7, + flexDirection: 'row', + gap: 10 + }, + option: { + marginBottom: 25, + }, + optionTitle: { + color: '#ffffff', + fontSize: 14, + fontWeight: '600', + }, + optionDescription: { + color: '#9693A8', + marginTop: 1, + fontSize: 14, + maxWidth: 250 + }, + primaryButton: { + backgroundColor: '#2D52EC', + paddingVertical: 14, + borderRadius: 8, + alignItems: 'center', + marginTop: 50 + }, + primaryButtonText: { + color: '#FFFFFF', + fontWeight: 'bold', + fontSize: 16, + }, + secondaryButton: { + alignItems: 'center', + paddingVertical: 14, + borderRadius: 8, + borderWidth: 1, + borderColor: '#2D52EC', + }, + secondaryButtonText: { + color: '#FFFFFF', + fontWeight: 'bold', + fontSize: 16, + }, + footerNote: { + color: '#666', + fontSize: 14, + textAlign: 'center', + }, +}); +