Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

fix: sign-up error #547

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/client-web/src/routes/accounts/sign-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export const SignUp: React.FC = () => {
// On Form Submit
const [userCreate, { loading: userCreateLoading }] = useUserCreateMutation()
const onFinish = async (values: object): Promise<void> => {
const input = omit(values, ['confirm_password']) as UserCreateInput
const input = omit(
values,
hasFederatedIdentity ? ['confirm_password', 'email', 'password'] : ['confirm_password']
) as UserCreateInput
const { data } = await userCreate({ variables: { input } })
const result = data?.userCreate
mutationResultHandler(result, () => {
Expand Down