Profile image works, editing profile works, now uses first/last name
This commit is contained in:
@@ -22,12 +22,14 @@ function RegisterPage() {
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
const [form, setForm] = useState({
|
||||
fullName: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
username: "",
|
||||
email: "",
|
||||
phone: "",
|
||||
password: "",
|
||||
confirmPassword: "",});
|
||||
confirmPassword: "",
|
||||
});
|
||||
|
||||
const [error, setError] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -47,7 +49,9 @@ function RegisterPage() {
|
||||
|
||||
setLoading(true);
|
||||
try {
|
||||
await register({fullName: form.fullName,
|
||||
await register({
|
||||
firstName: form.firstName,
|
||||
lastName: form.lastName,
|
||||
username: form.username,
|
||||
email: form.email,
|
||||
phone: form.phone,
|
||||
@@ -74,12 +78,24 @@ function RegisterPage() {
|
||||
|
||||
<form className="auth-form" onSubmit={handleSubmit}>
|
||||
<label className="auth-label">
|
||||
Full Name
|
||||
First Name
|
||||
<input
|
||||
className="auth-input"
|
||||
type="text"
|
||||
name="fullName"
|
||||
value={form.fullName}
|
||||
name="firstName"
|
||||
value={form.firstName}
|
||||
onChange={handleChange}
|
||||
required
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label className="auth-label">
|
||||
Last Name
|
||||
<input
|
||||
className="auth-input"
|
||||
type="text"
|
||||
name="lastName"
|
||||
value={form.lastName}
|
||||
onChange={handleChange}
|
||||
required
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user