import React, { useState } from "react"; import { Button, Input } from "antd"; import { useCreateUser } from "../../hooks/useCreateUser"; import { useNavigate } from "react-router"; export const SignUp = () => { const [username, setUsername] = useState(""); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [repeatPassword, setRepeatPassword] = useState(""); const navigate = useNavigate(); const { createUser, isLoading, error } = useCreateUser(); return (
setEmail(ev.target.value)} /> setUsername(ev.target.value)} /> setPassword(ev.target.value)} /> setRepeatPassword(ev.target.value)} /> {error ? (
{error}
) : ( <> )}
); };