Skip to content

Commit

Permalink
refactor: remove obsolete useMemo
Browse files Browse the repository at this point in the history
  • Loading branch information
Hornebom committed Aug 3, 2023
1 parent d8c4620 commit 1c9e7d2
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions centrifuge-app/src/pages/Pools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,8 @@ function Pools() {
).map((q) => q.data)
const centPoolsMetaDataById = getMetasById(centPools, centPoolsMetaData)

const pools = React.useMemo(() => {
return !!listedPools?.length ? poolsToPoolCardProps(listedPools, centPoolsMetaDataById, cent) : []
}, [listedPools, centPoolsMetaDataById])

const filteredPools = React.useMemo(() => {
if (!pools?.length) {
return []
}

const searchParams = new URLSearchParams(search)
return filterPools(pools, searchParams)
}, [search, pools])
const pools = !!listedPools?.length ? poolsToPoolCardProps(listedPools, centPoolsMetaDataById, cent) : []
const filteredPools = !!pools?.length ? filterPools(pools, new URLSearchParams(search)) : []

if (!listedPools.length) {
return (
Expand Down

0 comments on commit 1c9e7d2

Please sign in to comment.