Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding "Accepted Files: PDF" to resume section in registration to not have confusion #121

Merged
merged 1 commit into from
Sep 30, 2024
Merged
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
31 changes: 19 additions & 12 deletions apps/web/src/components/registration/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
shirtSize: "" as any,
schoolID: "",
university: "",
phoneNumber:"",
countryOfResidence:"",
phoneNumber: "",
countryOfResidence: "",
},
});

Expand All @@ -116,10 +116,9 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
}
}, [universityValue]);


useEffect(()=>{
console.log(countryValue)
},[countryValue])
useEffect(() => {
console.log(countryValue);
}, [countryValue]);

async function onSubmit(data: z.infer<typeof RegisterFormValidator>) {
console.log(data);
Expand Down Expand Up @@ -180,7 +179,7 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
setIsLoading(false);
alert(
`Something went wrong while attempting to register. Please try again. If this is a continuing issue, please reach out to us at ${c.issueEmail}.`,
)
);
return console.log(
`Recieved a unexpected response from the server. Please try again. If this is a continuing issue, please reach out to us at ${c.issueEmail}.`,
);
Expand Down Expand Up @@ -1148,11 +1147,19 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
>
<input {...getInputProps()} />
<p className="p-2 text-center">
{uploadedFile
? `${uploadedFile.name} (${Math.round(uploadedFile.size / 1024)}kb)`
: isDragActive
? "Drop your resume here..."
: "Drag 'n' drop your resume here, or click to select a file"}
{uploadedFile ? (
`${uploadedFile.name} (${Math.round(uploadedFile.size / 1024)}kb)`
) : isDragActive ? (
"Drop your resume here..."
) : (
<div>
Drag 'n' drop your
resume here, or click to
select a file
<br />
Accepted files: PDF
</div>
)}
</p>
{uploadedFile ? (
<Button
Expand Down
Loading