lbry-desktop/ui/redux/selectors
infinite-persistence dbb9ee7ac6
PremiumBadge: retrieve membership db internally instead of from parent (#1764)
* DRY up membership selector

Selectors should be chained up, not copy/pasted.

* PremiumBadge: retrieve membership db internally instead of from parent

## Ticket
1753 odyseeMembershipByUri function causing unnecessary renders

## Issue
While the rendering issue in the ticket is due to the way the props are defined, it also surfaced a prop-drilling issue with PremiumBadge.

Instead of asking the parent for the membership db, it can retrieve from Redux itself. This prevents the prop from polluting 2 levels of components and causing unnecessary renders.

## Approach
- Make `PremiumBadge` accept `uri` like most other components.
- I still leave the `membership` prop as (i.e. parent can still pass it directly). In some cases (e.g. `livestreamComment`, `page/odyseeMembership`), the parent itself needs the same data, so we don't need to derive it twice.
2022-07-01 15:40:06 -04:00
..
app.js Fix default channel changing with active channel on header 2022-05-05 11:24:22 -04:00
blocked.js Geo blocklist - reimplement with backend support (#1089) 2022-03-14 15:15:30 -04:00
claims.js PremiumBadge: retrieve membership db internally instead of from parent (#1764) 2022-07-01 15:40:06 -04:00
coinSwap.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
collections.js 6205 remember last used playlist choice odysee (#967) 2022-03-14 09:07:27 -04:00
comments.js Comment: filter geo-restricted channels 2022-05-24 12:53:40 -04:00
content.js 1318: Persist recsys data for send after tab close 2022-05-24 13:52:50 -04:00
file_info.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
livestream.js Remove active livestream condition 2022-05-16 06:36:50 -04:00
notifications.js Stacked toast view 2022-05-06 13:53:39 -04:00
publish.js doCheckPublishNameAvailability: case-insensitive version 2022-04-18 00:44:11 -04:00
reactions.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
reportContent.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
rewards.js Fix referrer on embed (#1181) 2022-03-22 14:13:19 -04:00
search.js Recsys: capture and use x-uuid from search results (#1727) 2022-06-22 09:43:54 -04:00
settings.js Add 'announcement' to v2 homepage api 2022-05-20 00:04:05 +08:00
subscriptions.js Recsys: pass isFollowing and incognito 2022-05-12 18:35:20 -04:00
sync.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
tags.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00
user.js Fix localStorage crash 2022-05-26 08:27:35 -04:00
wallet.js Don't memoize selectors without transformation 2021-10-24 13:05:06 +08:00