Skip to content

Commit

Permalink
most recently added Org displays at the top
Browse files Browse the repository at this point in the history
  • Loading branch information
anurag0006 committed Feb 27, 2023
1 parent b36bb63 commit 0836f39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/screens/OrgList/OrgList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,11 @@ function OrgList(): JSX.Element {
});
}
};

let dataRevOrg;
const debouncedHandleSearchByName = debounce(handleSearchByName);

if (data) {
dataRevOrg = data.organizationsConnection.slice().reverse();
}
return (
<>
<ListNavbar />
Expand Down Expand Up @@ -216,7 +218,7 @@ function OrgList(): JSX.Element {
<div className={styles.list_box}>
{data &&
(rowsPerPage > 0
? data.organizationsConnection.slice(
? dataRevOrg.slice(
page * rowsPerPage,
page * rowsPerPage + rowsPerPage
)
Expand Down

0 comments on commit 0836f39

Please sign in to comment.