import React from "react"; import { Header } from "../../components/UI/Header"; import Layout from "../../components/UI/Layout"; import { Title } from "../../components/UI/Elements/Styles/Title"; import { signup } from "../../services/auth/auth"; const SignUp = () => { const [email, setEmail] = React.useState(""); const [password, setPassword] = React.useState(""); const [username, setUsername] = React.useState(""); const handleSubmit = (e: any) => { e.preventDefault(); console.log({ email, password, username }); alert(JSON.stringify({ email, password, username })); signup({ email, password, username }); }; const handleEmailChange = (e: any) => { setEmail(e.target.value); }; const handlePasswordChange = (e: any) => { setPassword(e.target.value); }; const handleUsernameChange = (e: any) => { setUsername(e.target.value); }; return (
Sign up
); }; export default SignUp;