Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions frontend/pages/SignUpPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,10 @@ export default function SignUpPage() {
const [showPassword, setShowPassword] = useState(false)
const [formData, setFormData] = useState({name: "",email: "",password: "",confirmPassword: ""})

const passwordStrength = [
formData.password.length >= 8,
/[A-Z]/.test(formData.password),
/[a-z]/.test(formData.password),
/\d/.test(formData.password),
/[@#$!%&*]/.test(formData.password),
].filter(Boolean).length


const handleSubmit = async (e) => {
e.preventDefault()

const passwordRegex =
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@#$!%&*])[A-Za-z\d@#$!%&*]{8,}$/

if (formData.password !== formData.confirmPassword) {
toast.error("Passwords do not match")
return
Expand Down Expand Up @@ -97,7 +86,7 @@ export default function SignUpPage() {
</div>
</div>

<div className="flex flex-col items-center p-8 sm:p-12 bg-base-100 h-screen overflow-y-auto">
<div className="flex flex-col justify-center items-center p-8 sm:p-12 bg-base-100 min-h-screen">
<div className="w-full max-w-md space-y-8 py-8">
<div className="text-center mb-8">
<div className="flex flex-col items-center gap-3 group">
Expand Down
Loading