Skip to content

Commit

Permalink
Update for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhelp committed Aug 12, 2024
1 parent 28969a9 commit a19f9c4
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions apps/web/src/components/registration/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,16 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
},
});

const { isSubmitSuccessful, isSubmitted, errors} = form.formState;
const { isSubmitSuccessful, isSubmitted, errors } = form.formState;

const hasErrors = !isSubmitSuccessful && isSubmitted;

useEffect(() => {
console.log("errors are", errors);
},[errors]);


const [uploadedFile, setUploadedFile] = useState<File | null>(null);
const [skills, setSkills] = useState<Tag[]>([]);
const [isLoading, setIsLoading] = useState(false);
const universityValue = form.watch("university");
const bioValue = form.watch("bio");

// wtf is this
useEffect(() => {
if (universityValue != c.localUniversityName.toLowerCase()) {
form.setValue("shortID", "NOT_LOCAL_SCHOOL");
Expand Down Expand Up @@ -557,7 +551,6 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
onSelect={(
value,
) => {

form.setValue(
"university",
value,
Expand Down Expand Up @@ -1214,11 +1207,12 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) {
/>
</FormGroupWrapper>
<Button type="submit">Submit</Button>
{
hasErrors && (
<p className="text-red-800">Something doesn't look right. Please check your inputs.</p>
)
}
{hasErrors && (
<p className="text-red-800">
Something doesn't look right. Please check your
inputs.
</p>
)}
</form>
</Form>
</div>
Expand Down

0 comments on commit a19f9c4

Please sign in to comment.