From 0b630a8f36ae561bcf7eade26da3bafd88220aba Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Fri, 21 Jan 2022 14:28:17 +0200 Subject: [PATCH] Improve code style Signed-off-by: Janne Savolainen --- .../item-list-layout-header-info.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/renderer/components/item-object-list/item-list-layout-header/item-list-layout-header-info/item-list-layout-header-info.tsx b/src/renderer/components/item-object-list/item-list-layout-header/item-list-layout-header-info/item-list-layout-header-info.tsx index 8f767e78def8..cb711eb91388 100644 --- a/src/renderer/components/item-object-list/item-list-layout-header/item-list-layout-header-info/item-list-layout-header-info.tsx +++ b/src/renderer/components/item-object-list/item-list-layout-header/item-list-layout-header-info/item-list-layout-header-info.tsx @@ -17,13 +17,10 @@ interface ItemListLayoutHeaderInfoProps { } export const ItemListLayoutHeaderInfo = observer( - ({ - headerPlaceholders, - getItems, - getFilters, - store, - toggleFilters, - }: ItemListLayoutHeaderInfoProps) => { + (props: ItemListLayoutHeaderInfoProps) => { + const { headerPlaceholders, getItems, getFilters, store, toggleFilters } = + props; + const renderInfo = () => { const allItemsCount = store.getTotalCount(); const itemsCount = getItems().length; @@ -42,9 +39,10 @@ export const ItemListLayoutHeaderInfo = observer( : `${allItemsCount} items`; }; - const info = headerPlaceholders.info === undefined - ? renderInfo() - : headerPlaceholders.info; + const info = + headerPlaceholders.info === undefined + ? renderInfo() + : headerPlaceholders.info; if (!info) { return null;