version 0.2.0

This commit is contained in:
Paolo Miguel de Leon
2022-02-15 11:17:17 +08:00
committed by Ken Lewerentz
parent 5115af1ae7
commit b5be632225
166 changed files with 58836 additions and 70 deletions

View 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 });
},
};
}