V2 onboarding (#2543)

* fix cannot query avatarUrl

* create workspace working

* fix bugs related to refetch queries

* onboarding working

* updated dependency array

* improve error handling

* update types, remove as any, remove console logs

* small fix
This commit is contained in:
bosiraphael
2023-11-16 17:09:10 +01:00
committed by GitHub
parent b1b6bbe7d3
commit 0ae9373532
18 changed files with 127 additions and 120 deletions

View File

@ -1,7 +1,6 @@
import { useCallback } from 'react';
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
import { useNavigate } from 'react-router-dom';
import { getOperationName } from '@apollo/client/utilities';
import styled from '@emotion/styled';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
@ -15,7 +14,6 @@ import { useSnackBar } from '@/ui/feedback/snack-bar/hooks/useSnackBar';
import { MainButton } from '@/ui/input/button/components/MainButton';
import { TextInput } from '@/ui/input/components/TextInput';
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
import { useUpdateWorkspaceMutation } from '~/generated/graphql';
const StyledContentContainer = styled.div`
@ -69,8 +67,6 @@ export const CreateWorkspace = () => {
displayName: data.name,
},
},
refetchQueries: [getOperationName(GET_CURRENT_USER) ?? ''],
awaitRefetchQueries: true,
});
if (result.errors || !result.data?.updateWorkspace) {