Skip to content

Commit

Permalink
Merge pull request #195 from HackRU/dev
Browse files Browse the repository at this point in the history
fixed logic
  • Loading branch information
avsomers25 authored Oct 2, 2024
2 parents 132a1c3 + 3d37788 commit a205d1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/(pre-dashboard)/(entry)/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function SignupPage() {
email: z.string().email("Please enter a valid email address").nonempty("Please fill out the email field"),
first_name: z.string().nonempty("Please fill out the first name field"),
last_name: z.string().nonempty("Please fill out the last name field"),
password: z.string().min(6, "Password must be at least 6 characters").nonempty("Please fill out the password field"),
password: z.string().min(4, "Password must be at least 4 characters").nonempty("Please fill out the password field"),
confirm_password: z.string().nonempty("Please confirm your password")
}).refine((data) => data.password === data.confirm_password, {
message: "Passwords don't match",
Expand Down
4 changes: 3 additions & 1 deletion app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ export default function Dashboard() {
const requiredFields = ["first_name","last_name","resume","github","major","short_answer","shirt_size","hackathon_count","dietary_restrictions","special_needs","age","school","grad_year","gender","level_of_study","country_of_residence","ethnicity","how_you_heard_about_hackru","reasons","phone_number"]
for (let i = 0; i < requiredFields.length; i++) {
if (!userData[requiredFields[i]]){
if(!resumeExists){
if(requiredFields[i] == "resume" && resumeExists){
}
else{
console.log("THIS FIELD IS FAIL" + requiredFields[i])
trigger(requiredFields[i] as any, { shouldFocus: true });
alert("Please scroll down and fill out the entire profile before registering");
Expand Down

0 comments on commit a205d1a

Please sign in to comment.