Refactored useFindOneObjectMetadataItem and useFindManyObjectMetadataItems (#2600)

* Refactored useFindOneObjectMetadataItem and useFindManyObjectMetadataItems to rely on a recoil family selector

* Removed console.log

* Cleaned

* Removed unused hook

* Fixed seeds
This commit is contained in:
Lucas Bordeau
2023-11-20 16:34:06 +01:00
committed by GitHub
parent 3ad30a0498
commit 189586830e
44 changed files with 190 additions and 239 deletions

View File

@ -1,13 +1,13 @@
import { useApolloClient } from '@apollo/client';
import { useRecoilCallback } from 'recoil';
import { useFindOneObjectMetadataItem } from '@/object-metadata/hooks/useFindOneObjectMetadataItem';
import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem';
import { ViewField } from '@/views/types/ViewField';
import { getViewScopedStateValuesFromSnapshot } from '@/views/utils/getViewScopedStateValuesFromSnapshot';
export const useViewFields = (viewScopeId: string) => {
const { updateOneMutation, createOneMutation, findManyQuery } =
useFindOneObjectMetadataItem({
useObjectMetadataItem({
objectNameSingular: 'viewField',
});