From 291c204055fa3b763ac2dc2beea1db29fe2a914d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Gonz=C3=A1lez=20Mu=C3=B1oz?= Date: Wed, 16 Oct 2024 10:46:56 +0200 Subject: [PATCH] fixes typing of hook --- client/src/containers/profile/account-details/index.tsx | 5 +---- client/src/containers/profile/update-email/index.tsx | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/client/src/containers/profile/account-details/index.tsx b/client/src/containers/profile/account-details/index.tsx index 9571715a..ec7c2e32 100644 --- a/client/src/containers/profile/account-details/index.tsx +++ b/client/src/containers/profile/account-details/index.tsx @@ -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>({ resolver: zodResolver(accountDetailsSchema), defaultValues: { - // @ts-expect-error todo name: user?.name, - // @ts-expect-error todo role: user?.role, }, mode: "onSubmit", @@ -145,7 +143,6 @@ 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>({ resolver: zodResolver(accountDetailsSchema), defaultValues: { - // @ts-expect-error todo email: user?.email, }, mode: "onSubmit", @@ -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}