import React, {useState} from 'react';
import {SplashScreenProps} from '@/navigation';
import {Button} from 'react-native-paper';
import {huddlLoginWithEmailAndPassword, testCredentials} from '@/services';
import {useTypedDispatch} from '@/store';
import {showSnackbar} from '@/store/slices';
const ChatButton = ({email, password}) => {
const [isSigninIn, setIsSigningIn] = useState(false);
const dispatch = useTypedDispatch();
const signIn = async () => {
setIsSigningIn(true);
const loginResult =
(await huddlLoginWithEmailAndPassword({email, password})) || {};
const {error, data, status} = loginResult;
console.log(data);
console.log(status);
console.log(error);
setIsSigningIn(false);
};
return (
<Button disabled={isSigninIn} loading={isSigninIn} onPress={signIn}>
Chat
</Button>
);
};
export default SplashScreen;
huddl_rn_wrapper
0.0.6 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i huddl_rn_wrapper
Weekly Downloads
41
Version
0.0.6
License
none
Unpacked Size
564 kB
Total Files
626