From 2cdfd5fe82624ee29a46d2193ea83a69fc5dddad Mon Sep 17 00:00:00 2001 From: Paul Stoker Date: Fri, 17 Nov 2023 09:53:54 +0100 Subject: [PATCH] Simplify func Signed-off-by: Paul Stoker --- .../catalog/src/components/CatalogTable/CatalogTable.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 602aad38c0..d8eb2cf04e 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -137,9 +137,11 @@ export const CatalogTable = (props: CatalogTableProps) => { const entityListContext = useEntityList(); const { loading, error, entities, filters } = entityListContext; - const tableColumns = useMemo(() => { - return typeof columns === 'function' ? columns(entityListContext) : columns; - }, [columns, entityListContext]); + const tableColumns = useMemo( + () => + typeof columns === 'function' ? columns(entityListContext) : columns, + [columns, entityListContext], + ); const showTypeColumn = filters.type === undefined; // TODO(timbonicus): remove the title from the CatalogTable once using EntitySearchBar