import { Button, Icon } from '@/components'; import { githubActions, useAppDispatch, useGithubStore } from '@/store'; import { Mint } from '@/views/mint/mint.context'; import { useCallback } from 'react'; export const GithubButton = () => { const { state } = useGithubStore(); const dispatch = useAppDispatch(); const { setGithubStep } = Mint.useContext(); const handleGithubLogin = useCallback(() => { dispatch(githubActions.login()) .then(() => setGithubStep(2)) .catch((error) => { //TODO show toast with error message console.log(error); }); }, [dispatch]); return ( ); };