Differential D12771 Diff 37013 web/cashtab/src/components/Authentication/ProtectableComponentWrapper.js
Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/Authentication/ProtectableComponentWrapper.js
Show All 9 Lines | if (authentication) { | ||||
const { loading, isAuthenticationRequired, isSignedIn } = | const { loading, isAuthenticationRequired, isSignedIn } = | ||||
authentication; | authentication; | ||||
if (loading) { | if (loading) { | ||||
return <p>Loading authenticaion data...</p>; | return <p>Loading authenticaion data...</p>; | ||||
} | } | ||||
// prompt if user would like to enable biometric lock when the app first run | // prompt if user would like to enable biometric lock when the app first run | ||||
if (isAuthenticationRequired === undefined) { | if (typeof isAuthenticationRequired === 'undefined') { | ||||
return <SignUp />; | return <SignUp />; | ||||
} | } | ||||
// prompt user to sign in | // prompt user to sign in | ||||
if (isAuthenticationRequired && !isSignedIn) { | if (isAuthenticationRequired && !isSignedIn) { | ||||
return <SignIn />; | return <SignIn />; | ||||
} | } | ||||
} | } | ||||
Show All 10 Lines |