lbry-desktop/ui/component/claimTilesDiscover
infinite-persistence 0e5f528183
ClaimTilesDiscover: factor out options
## Change
Move the `option` code outside and passed in as a pre-calculated prop.

## Reason
To skip rendering while waiting for `claim_search`, we need to add `React.memo(areEqual)`. However, the flag that determines if we are fetching `claim_search` (fetchingClaimSearchByQuery[]) depends on the derived options as the key.

Instead of calculating `options` twice, we moved it to the props so both sides can use it.

It also makes the component a bit more readable.

The downside is that the prop-passing might not be clear.
2021-09-25 12:05:07 +08:00
..
index.js ClaimTilesDiscover: factor out options 2021-09-25 12:05:07 +08:00
view.jsx ClaimTilesDiscover: factor out options 2021-09-25 12:05:07 +08:00