diff --git a/app/components/CreateCollection/index.tsx b/app/components/CreateCollection/index.tsx index c247509..2da7e2a 100644 --- a/app/components/CreateCollection/index.tsx +++ b/app/components/CreateCollection/index.tsx @@ -29,7 +29,7 @@ const CreateCollection = () => { const onSubmit = async (data: Record) => { await signAndBroadcast(data); }; - const errorMessage = formState.errors && (Object.values(formState.errors)[0]?.message as string); + const errorMessage = (Object.values(formState.errors)[0]?.message as string); const formError = errorMessage ? { message: errorMessage, diff --git a/app/components/EditProfile/index.tsx b/app/components/EditProfile/index.tsx index c712619..1855d56 100644 --- a/app/components/EditProfile/index.tsx +++ b/app/components/EditProfile/index.tsx @@ -54,7 +54,7 @@ const ProfileEdit = ({ data }: ProfileEditProps) => { const onSubmit = async (formValues: Record) => { await signAndBroadcast(formValues, data); }; - const errorMessage = formState.errors && (Object.values(formState.errors)[0]?.message as string); + const errorMessage = (Object.values(formState.errors)[0]?.message as string); const formError = errorMessage ? { message: errorMessage, diff --git a/app/hooks/useCreateEntity/useCreateProfile.ts b/app/hooks/useCreateEntity/useCreateProfile.ts index 3a26d89..ac86372 100644 --- a/app/hooks/useCreateEntity/useCreateProfile.ts +++ b/app/hooks/useCreateEntity/useCreateProfile.ts @@ -67,7 +67,7 @@ export const useCreateProfile = () => { { key: SUFFIXES.profile.secondary, value: (formValues.banner as File[])[0] }, ]; // @todo React upon upload failure - await uploadFiles(profile?.profileID ?? result.entityID as string, files); + await uploadFiles(profile.profileID ?? result.entityID as string, files); return setBroadcastStatus({ ...result, loading: false }); };