import { IoLogoGoogle } from 'react-icons/io'; import router from 'next/router'; import { toast } from 'react-toastify'; import { useState } from 'react'; const SignUpPanel = (props) => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [forgot, setForgot] = useState(false); const resetPassword = () => { props.resetPassword(email).then((result) => { if (result.error) { toast.error(result.error.message); } else toast.success('Check your email to reset your password!'); }); }; const signup = (e) => { e.preventDefault(); // Handle the login. Go to the homepage if success or display an error. props .signUp({ email, password, }) .then((result) => { if (result.data) { router.push('/'); } if (result.error) { toast.error(result.error.message); } }); }; return (
{!forgot && ( <>

Account Sign Up

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