mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
adapt splashScreen on passportData detection
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user