Skip to content

Commit

Permalink
Merge pull request #37716 from kubabutkiewicz/ts-migration/MoneyReque…
Browse files Browse the repository at this point in the history
…stConfirmationList/component

[TS migration] Migrate 'MoneyRequestConfirmationList.js' component to TypeScript
  • Loading branch information
AndrewGable authored Mar 12, 2024
2 parents a3b70bf + 67e4721 commit eb6213f
Show file tree
Hide file tree
Showing 8 changed files with 360 additions and 366 deletions.
4 changes: 2 additions & 2 deletions src/components/ButtonWithDropdownMenu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type WorkspaceDistanceRatesBulkActionType = DeepValueOf<typeof CONST.POLICY.DIST
type DropdownOption<TValueType> = {
value: TValueType;
text: string;
icon: IconAsset;
icon?: IconAsset;
iconWidth?: number;
iconHeight?: number;
iconDescription?: string;
Expand Down Expand Up @@ -58,7 +58,7 @@ type ButtonWithDropdownMenuProps<TValueType> = {
anchorAlignment?: AnchorAlignment;

/* ref for the button */
buttonRef: RefObject<View>;
buttonRef?: RefObject<View>;

/** The priority to assign the enter key event listener to buttons. 0 is the highest priority. */
enterKeyEventListenerPriority?: number;
Expand Down
6 changes: 3 additions & 3 deletions src/components/ConfirmedRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ type ConfirmedRoutePropsOnyxProps = {

type ConfirmedRouteProps = ConfirmedRoutePropsOnyxProps & {
/** Transaction that stores the distance request data */
transaction: Transaction;
transaction: OnyxEntry<Transaction>;
};

function ConfirmedRoute({mapboxAccessToken, transaction}: ConfirmedRouteProps) {
const {isOffline} = useNetwork();
const {route0: route} = transaction.routes ?? {};
const waypoints = transaction.comment?.waypoints ?? {};
const {route0: route} = transaction?.routes ?? {};
const waypoints = transaction?.comment?.waypoints ?? {};
const coordinates = route?.geometry?.coordinates ?? [];
const theme = useTheme();
const styles = useThemeStyles();
Expand Down
Loading

0 comments on commit eb6213f

Please sign in to comment.