diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 8d227fa6f697..a1cbb562997e 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -119,7 +119,7 @@ type SettingsNavigatorParamList = { policyID: string; }; [SCREENS.GET_ASSISTANCE]: { - taskID: string; + backTo: Routes; }; [SCREENS.SETTINGS.TWO_FACTOR_AUTH]: undefined; [SCREENS.SETTINGS.REPORT_CARD_LOST_OR_DAMAGED]: undefined; diff --git a/src/pages/GetAssistancePage.tsx b/src/pages/GetAssistancePage.tsx index cf3dcf98ac3b..46963e56997a 100644 --- a/src/pages/GetAssistancePage.tsx +++ b/src/pages/GetAssistancePage.tsx @@ -1,4 +1,4 @@ -import type {RouteProp} from '@react-navigation/native'; +import type {StackScreenProps} from '@react-navigation/stack'; import React from 'react'; import {ScrollView, View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -13,12 +13,13 @@ import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import Navigation from '@libs/Navigation/Navigation'; +import type {SettingsNavigatorParamList} from '@libs/Navigation/types'; import * as Link from '@userActions/Link'; import * as Report from '@userActions/Report'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; import ROUTES from '@src/ROUTES'; -import type {Route} from '@src/ROUTES'; +import type SCREENS from '@src/SCREENS'; import type {Account} from '@src/types/onyx'; type GetAssistanceOnyxProps = { @@ -26,10 +27,7 @@ type GetAssistanceOnyxProps = { account: OnyxEntry; }; -type GetAssistancePageProps = GetAssistanceOnyxProps & { - /** Route object from navigation */ - route: RouteProp<{params: {backTo: Route}}>; -}; +type GetAssistancePageProps = GetAssistanceOnyxProps & StackScreenProps; function GetAssistancePage({route, account}: GetAssistancePageProps) { const styles = useThemeStyles();