Skip to content

Commit

Permalink
fix(auth/signup): Update userdata with usernameOrEmail field
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Aug 11, 2024
1 parent ecee515 commit d5f7aec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/(pages)/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export default function Signup() {
const [isVisible, setIsVisible] = useState(false);
const [submitDisabled, setSubmitDisabled] = useState(true);
const [showOtp, setShowOtp] = useState(false);
const [userData, setUserData] = useState({ email: "", role: "", action: "" });
const [userData, setUserData] = useState({
usernameOrEmail: "",
role: "",
action: "",
});

const isRoleValid = Array.from(role).length > 0;

Expand Down Expand Up @@ -100,7 +104,7 @@ export default function Signup() {
const userRole = formData.get("role");

setUserData({
email,
usernameOrEmail: email,
role: userRole?.toString() || "",
action: "Signup",
});
Expand Down

0 comments on commit d5f7aec

Please sign in to comment.