Browse Source

Extract ApiKeyCount from state.

Carlos Mondragon 7 năm trước cách đây
mục cha
commit
0bf2d5ebcd
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      public/app/features/api-keys/state/selectors.ts

+ 2 - 0
public/app/features/api-keys/state/selectors.ts

@@ -1,5 +1,7 @@
 import { ApiKeysState } from 'app/types';
 
+export const getApiKeysCount = (state: ApiKeysState) => state.keys.length;
+
 export const getApiKeys = (state: ApiKeysState) => {
   const regex = RegExp(state.searchQuery, 'i');