Skip to content

Commit

Permalink
enbaled name field
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyshnav001 committed Nov 25, 2024
1 parent 9ce58c3 commit 2dd1862
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/common/registration-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function RegistrationForm() {
resolver: zodResolver(baseSchema),
defaultValues: {
designation: getSjecMemberType(session?.user.email!),
name: session?.user.name!,
name:session?.user.name!,
email: session?.user.email!,
phone: "",
entityName: "",
Expand Down Expand Up @@ -249,7 +249,7 @@ export default function RegistrationForm() {
const handleNext = async () => {
let isValid = false;
if (step === 1) {
isValid = await form.trigger(["designation", "foodPreference"]);
isValid = await form.trigger(["designation", "foodPreference","name"]);
} else if (step === 2) {
const designation = form.getValues("designation");
if (designation === "student") {
Expand Down Expand Up @@ -314,9 +314,9 @@ export default function RegistrationForm() {
<Input
placeholder="John Doe"
{...field}
value={session?.user.name!}
disabled
autoFocus
/>

</FormControl>
<FormMessage />
</FormItem>
Expand Down

0 comments on commit 2dd1862

Please sign in to comment.