mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
c134d322a9
commit
62f9172403
@ -342,17 +342,16 @@ export class ItemListLayout extends React.Component<ItemListLayoutProps> {
|
|||||||
const allItemsCount = this.props.store.getTotalCount();
|
const allItemsCount = this.props.store.getTotalCount();
|
||||||
const itemsCount = items.length;
|
const itemsCount = items.length;
|
||||||
const isFiltered = isReady && filters.length > 0;
|
const isFiltered = isReady && filters.length > 0;
|
||||||
const RefreshIcon = <Icon material="update" small={true} onClick={() => this.loadStores()} />;
|
|
||||||
|
|
||||||
if (isFiltered) {
|
if (isFiltered) {
|
||||||
const toggleFilters = () => userSettings.showAppliedFilters = !userSettings.showAppliedFilters;
|
const toggleFilters = () => userSettings.showAppliedFilters = !userSettings.showAppliedFilters;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<><a onClick={toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount} {RefreshIcon}</>
|
<><a onClick={toggleFilters}>Filtered</a>: {itemsCount} / {allItemsCount}</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return allItemsCount <= 1 ? <>{allItemsCount} item {RefreshIcon}</> : <>{allItemsCount} items {RefreshIcon}</>;
|
return allItemsCount <= 1 ? `${allItemsCount} item` : `${allItemsCount} items`;
|
||||||
}
|
}
|
||||||
|
|
||||||
renderHeader() {
|
renderHeader() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user