-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36314 from codinggeek2023/issueScan
[TS migration] Migrate 'IOUEditRequestReceipt' page to TypeScript
- Loading branch information
Showing
17 changed files
with
234 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/pages/iou/request/step/IOURequestStepScan/CameraPermission/index.js
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/pages/iou/request/step/IOURequestStepScan/CameraPermission/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type CameraPermissionModule from './types'; | ||
|
||
const CameraPermission: CameraPermissionModule = { | ||
requestCameraPermission: undefined, | ||
getCameraPermissionStatus: undefined, | ||
}; | ||
|
||
export default CameraPermission; |
6 changes: 6 additions & 0 deletions
6
src/pages/iou/request/step/IOURequestStepScan/CameraPermission/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type CameraPermissionModule = { | ||
requestCameraPermission: (() => Promise<string>) | undefined; | ||
getCameraPermissionStatus: (() => Promise<string>) | undefined; | ||
}; | ||
|
||
export default CameraPermissionModule; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type {CameraProps} from 'react-native-vision-camera'; | ||
import type {WebcamProps} from 'react-webcam'; | ||
|
||
type NavigationAwareCameraProps = WebcamProps & { | ||
/** Flag to turn on/off the torch/flashlight - if available */ | ||
torchOn?: boolean; | ||
|
||
/** The index of the tab that contains this camera */ | ||
onTorchAvailability?: (torchAvailable: boolean) => void; | ||
|
||
/** Callback function when media stream becomes available - user granted camera permissions and camera starts to work */ | ||
cameraTabIndex: number; | ||
}; | ||
|
||
type NavigationAwareCameraNativeProps = CameraProps & { | ||
cameraTabIndex: number; | ||
}; | ||
|
||
export type {NavigationAwareCameraProps, NavigationAwareCameraNativeProps}; |
Oops, something went wrong.