import { IoLogoGoogle } from 'react-icons/io'; import router from 'next/router'; import { toast } from 'react-toastify'; import { useState } from 'react'; type SignUpPanelProps = { signIn: ({}) => Promise<{ data: Record; error: { message: string } }>; signUp: ({}) => Promise<{ data: Record; error: { message: string } }>; }; const SignUpPanel = ({ signIn, signUp }: SignUpPanelProps): JSX.Element => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const signup = (e: React.SyntheticEvent) => { e.preventDefault(); // Handle the login. Go to the homepage if success or display an error. signUp({ email, password, }).then((result) => { if (result.data) { router.push('/'); } if (result.error) { toast.error(result.error.message); } }); }; return (

Account Sign Up

{ setEmail(event.target.value); }} />
{ setPassword(event.target.value); }} />
or sign up with
); }; export default SignUpPanel;