adapt splashScreen on passportData detection

This commit is contained in:
turnoffthiscomputer
2024-10-26 12:31:28 +02:00
parent 2cb868cfbb
commit f4b830b0b3
2 changed files with 4 additions and 4 deletions

View File

@@ -5,11 +5,11 @@ import { YStack, Text, Spinner, XStack } from 'tamagui';
import { textBlack } from '../utils/colors';
const SplashScreen = () => {
const { userLoaded, registered } = useUserStore();
const { userLoaded, passportData } = useUserStore();
const { setSelectedTab } = useNavigationStore();
useEffect(() => {
if (userLoaded) {
if (registered) {
if (passportData) {
setSelectedTab('app');
} else {
setSelectedTab('start');

View File

@@ -15,7 +15,7 @@ interface UserState {
dateOfBirth: string
dateOfExpiry: string
registered: boolean
passportData: PassportData
passportData: PassportData | null
secret: string
cscaProof: Proof | null
localProof: Proof | null
@@ -42,7 +42,7 @@ const useUserStore = create<UserState>((set, get) => ({
dateOfExpiry: DEFAULT_DOE ?? "",
dscSecret: null,
registered: false,
passportData: genMockPassportData("rsa_sha256", "FRA", "900101", "300101"),
passportData: null,
secret: "",
cscaProof: null,
localProof: null,