huddl_rn_wrapper
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

huddl-rn-wrapper

Getting started

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;

Readme

Keywords

none

Package Sidebar

Install

npm i huddl_rn_wrapper

Weekly Downloads

41

Version

0.0.6

License

none

Unpacked Size

564 kB

Total Files

626

Last publish

Collaborators

  • vishal.govind