Feat/show page metadata (#2234)
* Fix view fetch bug * Finished types * Removed console.log * Fixed todo * Working Object Show Page * Minor fixes * Fix custom object requests pending (#2240) * Fix custom object requests pending * fix typo * Fix various bugs * Typo * Fix * Fix * Fix --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -13,7 +13,7 @@ export const useFindManyObjects = <
|
||||
ObjectType extends { id: string } & Record<string, any>,
|
||||
>({
|
||||
objectNamePlural,
|
||||
}: MetadataObjectIdentifier) => {
|
||||
}: Pick<MetadataObjectIdentifier, 'objectNamePlural'>) => {
|
||||
const { foundMetadataObject, objectNotFoundInMetadata, findManyQuery } =
|
||||
useFindOneMetadataObject({
|
||||
objectNamePlural,
|
||||
@ -28,10 +28,12 @@ export const useFindManyObjects = <
|
||||
|
||||
const objects = useMemo(
|
||||
() =>
|
||||
formatPagedObjectsToObjects({
|
||||
pagedObjects: data,
|
||||
objectNamePlural,
|
||||
}),
|
||||
objectNamePlural
|
||||
? formatPagedObjectsToObjects({
|
||||
pagedObjects: data,
|
||||
objectNamePlural,
|
||||
})
|
||||
: [],
|
||||
[data, objectNamePlural],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user