Skip to content

Commit

Permalink
Added text saying only accepted files are PDF. Might want to make it …
Browse files Browse the repository at this point in the history
…dynamic later
  • Loading branch information
jacobellerbrock committed Sep 29, 2024
1 parent afc38b5 commit 9e81a95
Showing 1 changed file with 19 additions and 12 deletions.
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

0 comments on commit 9e81a95

Please sign in to comment.