diff --git a/frontend/src/components/contents/index.tsx b/frontend/src/components/contents/index.tsx index c2c104b..227c931 100644 --- a/frontend/src/components/contents/index.tsx +++ b/frontend/src/components/contents/index.tsx @@ -165,8 +165,8 @@ export const Contents = () => { field: "entity", headerName: t("label.entity"), flex: 1, - valueGetter: (row: IContent) => { - const contentType = getEntityFromCache(row.id); + valueGetter: (entityId) => { + const contentType = getEntityFromCache(entityId); return contentType?.name; }, diff --git a/frontend/src/services/entities.ts b/frontend/src/services/entities.ts index ab6ebb2..7b54093 100644 --- a/frontend/src/services/entities.ts +++ b/frontend/src/services/entities.ts @@ -164,10 +164,14 @@ export const ContentTypeEntity = new schema.Entity( }, ); -export const ContentEntity = new schema.Entity(EntityType.CONTENT, undefined, { - idAttribute: ({ id }) => id, - processStrategy: processCommonStrategy, -}); +export const ContentEntity = new schema.Entity( + EntityType.CONTENT, + { entity: ContentTypeEntity }, + { + idAttribute: ({ id }) => id, + processStrategy: processCommonStrategy, + }, +); export const SettingEntity = new schema.Entity(EntityType.SETTING, { idAttribute: ({ id }) => id,