mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
version 0.2.0
This commit is contained in:
committed by
Ken Lewerentz
parent
5115af1ae7
commit
b5be632225
20
screens/AuthScreenController.ts
Normal file
20
screens/AuthScreenController.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { useSelector } from '@xstate/react';
|
||||
import { useContext } from 'react';
|
||||
import { selectSettingUp } from '../machines/auth';
|
||||
import { RootRouteProps } from '../routes';
|
||||
import { GlobalContext } from '../shared/GlobalContext';
|
||||
|
||||
export function useAuthScreen(props: RootRouteProps) {
|
||||
const { appService } = useContext(GlobalContext);
|
||||
const authService = appService.children.get('auth');
|
||||
|
||||
const isSettingUp = useSelector(authService, selectSettingUp);
|
||||
|
||||
return {
|
||||
isSettingUp,
|
||||
|
||||
usePasscode: () => {
|
||||
props.navigation.navigate('Passcode', { setup: isSettingUp });
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user