lbry-desktop/ui/component/common
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
..
form-components Disable spellchecker which is both broken and has unusual behavior 2022-04-07 10:27:45 -04:00
busy-indicator.jsx refactor lbrytv web server 2019-11-11 13:27:29 -05:00
card.jsx MAKE ODYSEE EVEN MORE BEAUTIFUL (#539) 2022-02-11 13:50:55 -05:00
comment-badge.jsx Membership subscriptions (#812) 2022-03-09 13:05:37 -05:00
credit-amount.jsx Fix NaN Tipped 2022-04-19 19:33:12 -04:00
debounced-input.jsx DebouncedSearch: add inline option + use FormField 2022-03-01 10:50:07 -05:00
empty.jsx show loading while searching 2020-12-28 15:00:15 -05:00
error-text.jsx new signin/signup (#3960) 2020-04-13 15:16:07 -04:00
file-exporter.jsx i18n updates and fixes (#822) 2022-02-07 13:15:22 -05:00
file-list.jsx Support drag-and-drop file publishing (#4170) 2020-05-25 10:27:36 -04:00
file-selector.jsx Thumbnail upload fixes (#6860) 2021-08-24 20:28:23 -04:00
form.jsx refactor lbrytv web server 2019-11-11 13:27:29 -05:00
header-menu-link.jsx Fix menu link 2022-05-05 11:24:22 -04:00
help-link.jsx [on hold recsys work] Recommended For You (#782) 2022-03-15 15:07:31 -04:00
hidden-nsfw.jsx refactor lbrytv web server 2019-11-11 13:27:29 -05:00
icon-custom.jsx Add platforms to share buttons (#1721) 2022-06-22 08:23:40 -04:00
icon.jsx use aria-hidden on all icons by default 2021-07-14 13:44:22 -05:00
lbc-message.jsx fix lbc-message to prevent incorrect 'Credits' replacement 2021-04-30 12:45:46 -04:00
lbc-symbol.jsx add channel staked amount indicator on channel thumbnails 2021-02-18 01:14:39 -05:00
loading-screen.jsx refactor floatingUri to allow inline players in comments/markdown 2020-10-21 15:29:29 -04:00
markdown-preview.jsx Workaround for markdown crash with Google Translate (#1773) 2022-06-29 08:25:21 -04:00
nag.jsx Use locale/get response to suggest homepage and language switch (#839) 2022-03-02 09:44:01 -05:00
paginate.jsx added setTextValue to handlePaginateKeyUp function 2022-04-28 10:27:48 -04:00
qr-code.jsx flow fixes 2020-12-16 10:52:22 -05:00
status-bar.jsx Fix unencoded StatusBar on Desktop 2021-03-09 16:17:57 -05:00
tabs.jsx fix expandable view 2022-02-07 10:18:50 -05:00
thumbnail.jsx refactor lbrytv web server 2019-11-11 13:27:29 -05:00
tooltip.jsx Membership subscriptions (#812) 2022-03-09 13:05:37 -05:00
transaction-link.jsx refactor lbrytv web server 2019-11-11 13:27:29 -05:00
truncated-text.jsx refactor lbrytv web server 2019-11-11 13:27:29 -05:00
wait-until-on-page.jsx Re-design comment threads (#1489) 2022-05-16 06:22:13 -04:00