Skip to content

Commit

Permalink
fixes typing of hook
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgnlez authored and Andrés González committed Oct 16, 2024
1 parent a1a0cb5 commit 291c204
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions client/src/containers/profile/account-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ const UpdateEmailForm: FC = () => {
},
},
{
// @ts-expect-error todo
select: (data) => data.body.data,
queryKey: queryKeys.user.me(session?.user?.id as string).queryKey,
},
);

const form = useForm<z.infer<typeof accountDetailsSchema>>({
resolver: zodResolver(accountDetailsSchema),
defaultValues: {
// @ts-expect-error todo
name: user?.name,
// @ts-expect-error todo
role: user?.role,
},
mode: "onSubmit",
Expand Down Expand Up @@ -145,7 +143,6 @@ const UpdateEmailForm: FC = () => {
<div className="relative flex items-center">
<Input
type="text"
// @ts-expect-error todo
placeholder={user?.role}
{...field}
disabled
Expand Down
4 changes: 1 addition & 3 deletions client/src/containers/profile/update-email/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ const UpdateEmailForm: FC = () => {
},
},
{
// @ts-expect-error todo
select: (data) => data.body.data,
queryKey: queryKeys.user.me(session?.user?.id as string).queryKey,
},
);

const form = useForm<z.infer<typeof accountDetailsSchema>>({
resolver: zodResolver(accountDetailsSchema),
defaultValues: {
// @ts-expect-error todo
email: user?.email,
},
mode: "onSubmit",
Expand Down Expand Up @@ -119,7 +118,6 @@ const UpdateEmailForm: FC = () => {
type="email"
autoComplete={field.name}
onKeyDown={handleEnterKey}
// @ts-expect-error todo
placeholder={user?.email}
className="w-full"
{...field}
Expand Down

0 comments on commit 291c204

Please sign in to comment.