forked from binary-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
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 binary-com#17 from george-usynin-binary/selfie_stepp
georeg / rm80662 / add selfie step into signup wizard
- Loading branch information
Showing
7 changed files
with
387 additions
and
35 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
2 changes: 1 addition & 1 deletion
2
packages/account/src/Components/poi/status/unsupported/constants.js
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
51 changes: 51 additions & 0 deletions
51
.../pages/payment-agent/payment-agent-signup/signup-wizard-steps/selfie-step/selfie-step.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,51 @@ | ||
import React from 'react'; | ||
import { SelfieUpload } from '@deriv/account'; | ||
import { setSelfie, setSelfieStepEnabled, TActionsTypes } from '../../signup-wizard/steps-reducer'; | ||
import './selfie.scss'; | ||
|
||
type TSelfieError = { | ||
code: string; | ||
message: string; | ||
}; | ||
|
||
type TSelfieFile = { | ||
lastModified: number; | ||
lastModifiedDate: Date; | ||
name: string; | ||
path: string; | ||
size: number; | ||
type: string; | ||
webkitRelativePath: string; | ||
}; | ||
|
||
export type TSelfie = { | ||
document_type: string; | ||
errors: TSelfieError[] | []; | ||
file: TSelfieFile; | ||
icon: string; | ||
info: string; | ||
name: string; | ||
pageType: string; | ||
}; | ||
|
||
type TSelfieStep = { | ||
selfie: { selfie_with_id: TSelfie } | null; | ||
dispatch: React.Dispatch<TActionsTypes>; | ||
}; | ||
|
||
const SelfieStep = ({ selfie, dispatch }: TSelfieStep) => { | ||
const onFileDrop = (value: TSelfie) => dispatch(setSelfie({ selfie_with_id: value })); | ||
|
||
//TODO: change the description for the selfie depending on the step number | ||
return ( | ||
<SelfieUpload | ||
initial_values={selfie} | ||
is_pa_signup | ||
onFileDrop={onFileDrop} | ||
dispatch={dispatch} | ||
setSelfieStepEnabled={setSelfieStepEnabled} | ||
/> | ||
); | ||
}; | ||
|
||
export default SelfieStep; |
Oops, something went wrong.