Skip to content

Commit

Permalink
fix: migrate RouteProp in CodesStep component
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispader committed Nov 20, 2024
1 parent d0d8539 commit a851cd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/settings/Security/TwoFactorAuth/Steps/CodesStep.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type {RouteProp} from '@react-navigation/native';
import {useRoute} from '@react-navigation/native';
import React, {useEffect, useMemo, useState} from 'react';
import {ActivityIndicator, View} from 'react-native';
Expand All @@ -21,6 +20,7 @@ import {READ_COMMANDS} from '@libs/API/types';
import Clipboard from '@libs/Clipboard';
import * as ErrorUtils from '@libs/ErrorUtils';
import localFileDownload from '@libs/localFileDownload';
import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types';
import type {BackToParams, SettingsNavigatorParamList} from '@libs/Navigation/types';
import StepWrapper from '@pages/settings/Security/TwoFactorAuth/StepWrapper/StepWrapper';
import useTwoFactorAuthContext from '@pages/settings/Security/TwoFactorAuth/TwoFactorAuthContext/useTwoFactorAuth';
Expand Down Expand Up @@ -50,7 +50,7 @@ function CodesStep({backTo}: CodesStepProps) {

const isUserValidated = user?.validated;
const contactMethod = account?.primaryLogin ?? '';
const route = useRoute<RouteProp<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.TWO_FACTOR_AUTH>>();
const route = useRoute<PlatformStackRouteProp<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.TWO_FACTOR_AUTH>>();

const loginData = useMemo(() => loginList?.[contactMethod], [loginList, contactMethod]);
const validateLoginError = ErrorUtils.getEarliestErrorField(loginData, 'validateLogin');
Expand Down

0 comments on commit a851cd7

Please sign in to comment.