Improve provisionning new accounts (#757)

* Improve provisionning new accounts

* Fix lint
This commit is contained in:
Charles Bochet
2023-07-19 11:23:53 -07:00
committed by GitHub
parent 16aa507d50
commit 04c9748a96
12 changed files with 168 additions and 15 deletions

View File

@ -14,6 +14,8 @@ import {
} from '~/generated/graphql';
import { logError } from '~/utils/logError';
import { SEARCH_COMPANY_QUERY } from '../../search/queries/search';
type OwnProps = {
people: Pick<Person, 'id'>;
};
@ -51,7 +53,10 @@ export function PeopleCompanyCreateCell({ people }: OwnProps) {
address: '',
createdAt: new Date().toISOString(),
},
refetchQueries: [getOperationName(GET_COMPANIES) || ''],
refetchQueries: [
getOperationName(GET_COMPANIES) ?? '',
getOperationName(SEARCH_COMPANY_QUERY) ?? '',
],
});
await updatePeople({