diff --git a/apps/web/src/app/api/registration/create/route.ts b/apps/web/src/app/api/registration/create/route.ts index 28914a22..783dc742 100644 --- a/apps/web/src/app/api/registration/create/route.ts +++ b/apps/web/src/app/api/registration/create/route.ts @@ -106,6 +106,7 @@ export async function POST(req: Request) { isFullyRegistered: true, phoneNumber:body.phoneNumber, isSearchable: body.profileIsSearchable, + countryOfResidence:body.countryOfResidence, }); await tx.insert(userHackerData).values({ diff --git a/apps/web/src/components/registration/RegisterForm.tsx b/apps/web/src/components/registration/RegisterForm.tsx index 2f96d9b0..a78c3547 100644 --- a/apps/web/src/components/registration/RegisterForm.tsx +++ b/apps/web/src/components/registration/RegisterForm.tsx @@ -52,6 +52,7 @@ import { put, type PutBlobResult } from "@vercel/blob"; import { Tag, TagInput } from "@/components/shadcn/ui/tag/tag-input"; import CreatingRegistration from "./CreatingRegistration"; import { bucketResumeBaseUploadUrl } from "config"; +import { count } from "console"; interface RegisterFormProps { defaultEmail: string; } @@ -92,6 +93,7 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) { schoolID: "", university: "", phoneNumber:"", + countryOfResidence:"", }, }); @@ -104,6 +106,7 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) { const [isLoading, setIsLoading] = useState(false); const universityValue = form.watch("university"); const bioValue = form.watch("bio"); + const countryValue = form.watch("countryOfResidence"); useEffect(() => { if (universityValue != c.localUniversityName) { @@ -113,7 +116,13 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) { } }, [universityValue]); + + useEffect(()=>{ + console.log(countryValue) + },[countryValue]) + async function onSubmit(data: z.infer) { + console.log(data); setIsLoading(true); if (!userId || !isLoaded) { setIsLoading(false); @@ -212,7 +221,7 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) { className="space-y-6" > -
+
-
+
( - + Gender - { - c.registration.raceOptions.map( - (option) => ( - - {option} - - ), - ) - } + {c.registration.raceOptions.map( + (option) => ( + + {option} + + ), + )} @@ -373,7 +380,7 @@ export default function RegisterForm({ defaultEmail }: RegisterFormProps) { control={form.control} name="ethnicity" render={({ field }) => ( - + Ethnicity