mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 21:18:14 -05:00
[INJIMOB-3319]: pass exitAppWithTimer props to decide app exist in error case for ovp same device flow (#1966)
Signed-off-by: Alka Prasad <prasadalka1998@gmail.com>
This commit is contained in:
@@ -42,11 +42,7 @@ export const Error: React.FC<ErrorProps> = props => {
|
||||
const [triggerExitFlow, setTriggerExitFlow] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
props.isVisible &&
|
||||
props.textButtonText === undefined &&
|
||||
props.primaryButtonText === undefined
|
||||
) {
|
||||
if (props.exitAppWithTimer) {
|
||||
const timeout = setTimeout(
|
||||
() => {
|
||||
setTriggerExitFlow(true);
|
||||
@@ -56,7 +52,7 @@ export const Error: React.FC<ErrorProps> = props => {
|
||||
|
||||
return () => clearTimeout(timeout);
|
||||
}
|
||||
}, [props.isVisible, props.textButtonText, props.primaryButtonText]);
|
||||
}, [props.exitAppWithTimer]);
|
||||
|
||||
useEffect(() => {
|
||||
if (triggerExitFlow) {
|
||||
@@ -219,4 +215,5 @@ export interface ErrorProps {
|
||||
textButtonEvent?: () => void;
|
||||
primaryButtonTestID?: string;
|
||||
textButtonTestID?: string;
|
||||
exitAppWithTimer?: boolean;
|
||||
}
|
||||
|
||||
@@ -421,6 +421,7 @@ export const SendVPScreen: React.FC<ScanLayoutProps> = props => {
|
||||
textButtonEvent={handleTextButtonEvent}
|
||||
customImageStyles={{paddingBottom: 0, marginBottom: -6}}
|
||||
customStyles={{marginTop: '30%'}}
|
||||
exitAppWithTimer={controller.isOVPViaDeepLink}
|
||||
testID={'vpShareError'}
|
||||
/>
|
||||
</React.Fragment>
|
||||
|
||||
Reference in New Issue
Block a user