Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nkshah2 committed Sep 4, 2023
1 parent 176f4cc commit 264064d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/static/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js.map

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/ui/components/usersListTable/UsersListTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
* under the License.
*/

import React, { useCallback, useContext } from "react";
import React from "react";

import { formatLongDate, formatNumber, getImageUrl } from "../../../utils";
import { PopupContentContext } from "../../contexts/PopupContentContext";
import { User, UserRecipeType } from "../../pages/usersList/types";
import PhoneDisplay from "../phoneNumber/PhoneNumber";
import { UserDetailProps } from "../userDetail/userDetail";
Expand Down Expand Up @@ -364,12 +363,11 @@ export const PlaceholderTableRows = (props: { rowCount: number; colSpan: number;
* get estimated count as a fallback if the count API don't give correct value
*/
const getEstimatedCount = (props: Pick<UserListProps, "count" | "limit" | "users" | "nextPaginationToken">) => {
const { count, limit, users, nextPaginationToken } = {
limit: LIST_DEFAULT_LIMIT,
const { count } = {
...props,
};
// in case the count is smaller than user's length, then estimate the count to be users.length + limit
return nextPaginationToken && count <= users.length ? users.length + limit : count;
return count;
};

export default UsersListTable;

0 comments on commit 264064d

Please sign in to comment.