1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

simplify the namespace selector placeholder logic

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann 2021-10-28 15:29:19 -04:00
parent e8a93788b0
commit 6d43dbb8eb

View File

@ -36,9 +36,8 @@ import { isMac } from "../../../common/vars";
const Placeholder = observer((props: PlaceholderProps<any, boolean>) => {
const getPlaceholder = (): React.ReactNode => {
const namespaces = namespaceStore.contextNamespaces;
const length = namespaceStore.selectedNamespaces.length ? namespaces.length : 0;
switch (length) {
switch (namespaceStore.selectedNamespaces.length) {
case 0:
return <>All namespaces</>;
case 1: