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

@ -29,7 +29,6 @@ export const SettingsObjectNewFieldStep2 = () => {
findActiveObjectMetadataItemBySlug,
findObjectMetadataItemById,
findObjectMetadataItemByNamePlural,
loading,
} = useObjectMetadataItemForSettings();
const activeObjectMetadataItem =
@ -45,7 +44,6 @@ export const SettingsObjectNewFieldStep2 = () => {
} = useFieldMetadataForm();
useEffect(() => {
if (loading) return;
if (!activeObjectMetadataItem) {
navigate(AppPath.NotFound);
return;
@ -61,7 +59,7 @@ export const SettingsObjectNewFieldStep2 = () => {
activeObjectMetadataItem,
findObjectMetadataItemByNamePlural,
initForm,
loading,
navigate,
]);