Skip to content

Commit

Permalink
Merge pull request #34715 from DylanDylann/fix/25179-type
Browse files Browse the repository at this point in the history
[TS Migration]: fix type while migrating GetAssistancePage to typescript
  • Loading branch information
pecanoro authored Jan 19, 2024
2 parents 0baad0a + 3b1ce94 commit a3856f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 4 additions & 6 deletions src/pages/GetAssistancePage.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -13,23 +13,21 @@ 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 = {
/** The details about the account that the user is signing in with */
account: OnyxEntry<Account>;
};

type GetAssistancePageProps = GetAssistanceOnyxProps & {
/** Route object from navigation */
route: RouteProp<{params: {backTo: Route}}>;
};
type GetAssistancePageProps = GetAssistanceOnyxProps & StackScreenProps<SettingsNavigatorParamList, typeof SCREENS.GET_ASSISTANCE>;

function GetAssistancePage({route, account}: GetAssistancePageProps) {
const styles = useThemeStyles();
Expand Down

0 comments on commit a3856f7

Please sign in to comment.