-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53e02b6
commit da8c03a
Showing
17 changed files
with
81 additions
and
105 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
packages/core-mobile/app/new/routes/(authenticator)/settingsTotp/_layout.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/core-mobile/app/new/routes/(authenticator)/totp/_layout.tsx
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
packages/core-mobile/app/new/routes/(authenticator)/totp/copyCode.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/core-mobile/app/new/routes/(authenticator)/totp/scanQrCode.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react' | ||
import { Stack } from 'new/components/navigation/Stack' | ||
|
||
export default function TotpLayout(): JSX.Element { | ||
return ( | ||
<Stack> | ||
<Stack.Screen name="authenticatorSetup" /> | ||
<Stack.Screen name="scanQrCode" /> | ||
<Stack.Screen name="copyCode" /> | ||
<Stack.Screen name="verifyCode" /> | ||
</Stack> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react' | ||
import { useSignupContext } from 'new/contexts/SignupProvider' | ||
import { useRouter } from 'expo-router' | ||
import { CopyCode as CopyCodeComponent } from '../../components/totp/CopyCode' | ||
import { Loader } from '../../components/totp/Loader' | ||
|
||
export default function CopyCode(): JSX.Element { | ||
const { handleCopyCode, totpKey } = useSignupContext() | ||
const router = useRouter() | ||
|
||
const handleBack = (): void => { | ||
router.canGoBack() && router.back() | ||
} | ||
|
||
if (totpKey === undefined) { | ||
return <Loader /> | ||
} | ||
|
||
return ( | ||
<CopyCodeComponent | ||
totpKey={totpKey} | ||
onCopyCode={handleCopyCode} | ||
onBack={handleBack} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react' | ||
import { useSignupContext } from 'new/contexts/SignupProvider' | ||
import { useRouter } from 'expo-router' | ||
import { ScanQrCode as ScanQrCodeComponent } from '../../components/totp/ScanQrCode' | ||
|
||
export default function ScanQrCode(): JSX.Element { | ||
const { totpChallenge } = useSignupContext() | ||
const router = useRouter() | ||
|
||
const goToVerifyCode = (): void => { | ||
router.push('./verifyCode') | ||
} | ||
|
||
const goToEnterCodeManually = (): void => { | ||
router.navigate('./copyCode') | ||
} | ||
|
||
return ( | ||
<ScanQrCodeComponent | ||
totpChallenge={totpChallenge} | ||
onEnterCodeManually={goToEnterCodeManually} | ||
onVerifyCode={goToVerifyCode} | ||
/> | ||
) | ||
} |
2 changes: 1 addition & 1 deletion
2
...outes/(authenticator)/totp/verifyCode.tsx → ...bile/app/new/routes/(totp)/verifyCode.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters