Simplify func

Signed-off-by: Paul Stoker <pstoker@spotify.com>
This commit is contained in:
Paul Stoker
2023-11-17 09:53:54 +01:00
parent 5d298865fb
commit 2cdfd5fe82
@@ -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