From 05bcaa8f0ea0b199afc9cfcc0f2221114628a237 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 17 Jul 2019 14:04:50 -0400 Subject: [PATCH] cleanup --- src/ui/component/claimListDiscover/view.jsx | 2 +- src/ui/component/common/icon-custom.jsx | 6 ++++ src/ui/component/socialShare/view.jsx | 1 - src/ui/component/userEmail/view.jsx | 25 +++++++++------ src/ui/component/userVerify/view.jsx | 2 +- src/ui/constants/icons.js | 2 +- src/ui/page/file/view.jsx | 2 +- src/ui/page/rewards/view.jsx | 9 ++---- src/ui/page/settings/view.jsx | 10 +++--- static/locales/en.json | 35 ++++++++++++++++++++- yarn.lock | 4 +-- 11 files changed, 69 insertions(+), 29 deletions(-) diff --git a/src/ui/component/claimListDiscover/view.jsx b/src/ui/component/claimListDiscover/view.jsx index b20b3ec5d..ed4dfed6a 100644 --- a/src/ui/component/claimListDiscover/view.jsx +++ b/src/ui/component/claimListDiscover/view.jsx @@ -57,7 +57,7 @@ function ClaimListDiscover(props: Props) { channel_ids?: Array, release_time?: string, not_tags?: Array, - } = { page_size: PAGE_SIZE, page }; + } = { page_size: PAGE_SIZE, page, no_totals: true }; const newTags = tagsString.split(','); const newChannelIds = channelsIdString.split(','); diff --git a/src/ui/component/common/icon-custom.jsx b/src/ui/component/common/icon-custom.jsx index 059f51491..4057af42e 100644 --- a/src/ui/component/common/icon-custom.jsx +++ b/src/ui/component/common/icon-custom.jsx @@ -253,4 +253,10 @@ export const icons = { ), + [ICONS.SUPPORT]: buildIcon( + + + + + ), }; diff --git a/src/ui/component/socialShare/view.jsx b/src/ui/component/socialShare/view.jsx index dac202b12..8044c5457 100644 --- a/src/ui/component/socialShare/view.jsx +++ b/src/ui/component/socialShare/view.jsx @@ -27,7 +27,6 @@ class SocialShare extends React.PureComponent { render() { const { claim } = this.props; const { short_url: shortUrl } = claim; - const { speechShareable, onDone } = this.props; const lbryTvPrefix = 'https://beta.lbry.tv/'; diff --git a/src/ui/component/userEmail/view.jsx b/src/ui/component/userEmail/view.jsx index a5d6782f4..05b69ddfe 100644 --- a/src/ui/component/userEmail/view.jsx +++ b/src/ui/component/userEmail/view.jsx @@ -1,5 +1,6 @@ // @flow -import * as React from 'react'; +import type { Node } from 'react'; +import React, { useEffect } from 'react'; import Button from 'component/button'; import { FormField } from 'component/common/form'; import UserEmailNew from 'component/userEmailNew'; @@ -7,7 +8,7 @@ import UserEmailVerify from 'component/userEmailVerify'; import cookie from 'cookie'; type Props = { - cancelButton: React.Node, + cancelButton: Node, email: string, resendVerificationEmail: string => void, checkEmailVerified: () => void, @@ -20,13 +21,6 @@ type Props = { function UserEmail(props: Props) { const { email, user, accessToken, fetchAccessToken } = props; - let isVerified = false; - if (user) { - isVerified = user.has_verified_email; - } - - if (!accessToken) fetchAccessToken(); - const buttonsProps = IS_WEB ? { onClick: () => { @@ -36,6 +30,17 @@ function UserEmail(props: Props) { } : { href: 'https://lbry.com/faq/how-to-change-email' }; + let isVerified = false; + if (user) { + isVerified = user.has_verified_email; + } + + useEffect(() => { + if (!accessToken) { + fetchAccessToken(); + } + }, [accessToken, fetchAccessToken]); + return (
{!email && } @@ -57,7 +62,7 @@ function UserEmail(props: Props) { readOnly label={ - {__('Your Email - ')}{' '} + {__('Your Email')}{' '}
diff --git a/src/ui/constants/icons.js b/src/ui/constants/icons.js index 9ffaae038..a5306cdce 100644 --- a/src/ui/constants/icons.js +++ b/src/ui/constants/icons.js @@ -53,7 +53,6 @@ export const SECURE = 'Lock'; export const MENU = 'Menu'; export const BACKUP = 'Database'; export const TRANSACTIONS = 'FileText'; -export const TRENDING_UP = 'TrendingUp'; export const LBRY = 'Lbry'; export const SEND = 'Send'; export const DISCOVER = 'Compass'; @@ -70,3 +69,4 @@ export const MUSIC_EQUALIZER = 'Sliders'; export const LIGHT = 'Sun'; export const DARK = 'Moon'; export const LIBRARY = 'Folder'; +export const SUPPORT = 'TrendingUp'; diff --git a/src/ui/page/file/view.jsx b/src/ui/page/file/view.jsx index 1d8409fec..123e78aec 100644 --- a/src/ui/page/file/view.jsx +++ b/src/ui/page/file/view.jsx @@ -245,7 +245,7 @@ class FilePage extends React.Component { {!claimIsMine && channelUri && }