How loading component work in screen
function SignUpScreen(props: ScreenProps) {
const router = useRouter()
const translate = useTranslate()
const { colors } = useTheme()
const { push, history, basePath } = useRouter()
const { isLoading, refetch, role, isLoggedIn, user_info } = useAuth();
useEffect(() => {
if (isLoggedIn) {
props.setLoadingComponent(true)
setTimeout(() => {
history.back()
props.setLoadingComponent(false)
}, 100);
}
else {
props.setLoadingComponent(false)
}
return () => {
}
}, [isLoading, isLoggedIn, refetch])
const {
sign_in,
password_error,
sign_up,
password,
name,
} = translate
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string>()
const signupHandle = async () => {
}
return (
<ScrollView>
//-----------------------------------------------
//-----------------------------------------------
//-----------------------------------------------
//-----------------------------------------------
//-----------------------------------------------
</ScrollView>
);
}
export default SignUpScreen;