Skip to content

Commit 2ce4328

Browse files
authored
Merge pull request #23864 from vipin87/fix/23369
2 parents 0dcb699 + 5671c62 commit 2ce4328

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/components/Onfido/index.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,9 @@
4747
height: 92% !important;
4848
}
4949
}
50+
51+
.onfido-sdk-ui-NavigationBar-back {
52+
/* This keeps onfido back button hidden since there is already a back button in the top header which
53+
programatically clicks onfido button. */
54+
visibility: hidden;
55+
}

src/pages/ReimbursementAccount/RequestorOnfidoStep.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ class RequestorOnfidoStep extends React.Component {
3131
constructor(props) {
3232
super(props);
3333
this.submit = this.submit.bind(this);
34+
this.goBack = this.goBack.bind(this);
35+
}
36+
37+
goBack() {
38+
const onfidoBack = document.querySelector('.onfido-sdk-ui-NavigationBar-back');
39+
if (onfidoBack && !onfidoBack.classList.contains('onfido-sdk-ui-NavigationBar-disabled')) {
40+
onfidoBack.click();
41+
} else {
42+
this.props.onBackButtonPress();
43+
}
3444
}
3545

3646
submit(onfidoData) {
@@ -50,7 +60,7 @@ class RequestorOnfidoStep extends React.Component {
5060
stepCounter={{step: 3, total: 5}}
5161
shouldShowGetAssistanceButton
5262
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_BANK_ACCOUNT}
53-
onBackButtonPress={this.props.onBackButtonPress}
63+
onBackButtonPress={this.goBack}
5464
/>
5565
<FullPageOfflineBlockingView>
5666
<ScrollView contentContainerStyle={styles.flex1}>

0 commit comments

Comments
 (0)