Skip to content

Commit 85e3005

Browse files
committed
formatting
1 parent cf5971d commit 85e3005

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

resources/js/hooks/use-two-factor-auth.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,23 @@ export const useTwoFactorAuth = () => {
3434
const fetchQrCode = useCallback(async (): Promise<void> => {
3535
try {
3636
const { svg } = await fetchJson<TwoFactorSetupData>(qrCode.url());
37+
3738
setQrCodeSvg(svg);
3839
} catch (error) {
3940
console.error('Failed to fetch QR code:', error);
41+
4042
setQrCodeSvg(null);
4143
}
4244
}, []);
4345

4446
const fetchSetupKey = useCallback(async (): Promise<void> => {
4547
try {
4648
const { secretKey: key } = await fetchJson<TwoFactorSecretKey>(secretKey.url());
49+
4750
setManualSetupKey(key);
4851
} catch (error) {
4952
console.error('Failed to fetch setup key:', error);
53+
5054
setManualSetupKey(null);
5155
}
5256
}, []);
@@ -59,9 +63,11 @@ export const useTwoFactorAuth = () => {
5963
const fetchRecoveryCodes = useCallback(async (): Promise<void> => {
6064
try {
6165
const codes = await fetchJson<string[]>(recoveryCodes.url());
66+
6267
setRecoveryCodesList(codes);
6368
} catch (error) {
6469
console.error('Failed to fetch recovery codes:', error);
70+
6571
setRecoveryCodesList([]);
6672
}
6773
}, []);
@@ -71,6 +77,7 @@ export const useTwoFactorAuth = () => {
7177
await Promise.all([fetchQrCode(), fetchSetupKey()]);
7278
} catch (error) {
7379
console.error('Failed to fetch setup data:', error);
80+
7481
setQrCodeSvg(null);
7582
setManualSetupKey(null);
7683
}

0 commit comments

Comments
 (0)