Skip to content

Commit

Permalink
refactor(INJI-472): disable back action in loader
Browse files Browse the repository at this point in the history
hardware back button press or gesture back action is disable in loader

Signed-off-by: Kiruthika Jeyashankar <[email protected]>
  • Loading branch information
KiruthikaJeyashankar committed Oct 20, 2023
1 parent c4355da commit a7b0d57
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions components/ui/Loader.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import React, {Fragment} from 'react';
import React, {Fragment, useEffect} from 'react';
import {useTranslation} from 'react-i18next';
import {Image, SafeAreaView, View} from 'react-native';
import {BackHandler, Image, SafeAreaView, View} from 'react-native';
import Spinner from 'react-native-spinkit';
import {Button, Centered, Column, Row, Text} from '../../components/ui';
import {Theme} from '../../components/ui/styleUtils';
import {Theme} from './styleUtils';
import testIDProps from '../../shared/commonUtil';

export const Loader: React.FC<LoaderProps> = props => {
const {t} = useTranslation('ScanScreen');

useEffect(() => {
const backHandler = BackHandler.addEventListener(
'hardwareBackPress',
() => true,
);
return () => backHandler.remove();
}, []);

return (
<Fragment>
<Row style={{backgroundColor: Theme.Colors.whiteBackgroundColor}}>
Expand Down

0 comments on commit a7b0d57

Please sign in to comment.