lbry-desktop/ui
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
..
component PremiumBadge: retrieve membership db internally instead of from parent (#1764) 2022-07-01 15:40:06 -04:00
constants Preorder content functionality (#1743) 2022-06-23 20:58:32 -04:00
contexts Category: Hide "Repost" from ContentType filter, except for WildWest 2022-04-25 08:49:46 -04:00
effects Handle browsers that don't support IntersectionObserver (#1739) 2022-06-23 08:10:27 -04:00
modal Preorder cleanup 2022-06-28 13:36:18 +08:00
page PremiumBadge: retrieve membership db internally instead of from parent (#1764) 2022-07-01 15:40:06 -04:00
redux PremiumBadge: retrieve membership db internally instead of from parent (#1764) 2022-07-01 15:40:06 -04:00
scss Make timestamp in mini player invisible on mobile 2022-07-01 06:29:23 +02:00
util Update thumbnail cards URL (#1748) 2022-06-23 18:09:48 -04:00
analytics.js Fix localStorage crash 2022-05-26 08:27:35 -04:00
app.js
comments.js Remove custom comments server 2022-02-03 10:24:58 -05:00
i18n.js Add env to auto report new strings in console 2022-01-05 00:26:31 -08:00
index.jsx 1318: Persist recsys data for send after tab close 2022-05-24 13:52:50 -04:00
lbry.js Tip: show modal instead of toast when timeout 2022-06-01 08:40:39 -04:00
logWarningConsoleMessage.js
native.js
reducers.js Support resume-able upload via tus (#186) 2021-11-10 13:16:16 -05:00
rewards.js Change logic for daily reward claiming to weekly 2021-12-23 02:40:58 -05:00
store.js 1318: Persist recsys data for send after tab close 2022-05-24 13:52:50 -04:00