From fe2142ba49281789ce7e88de294e6d10e2454820 Mon Sep 17 00:00:00 2001
From: saltrafael <76502841+saltrafael@users.noreply.github.com>
Date: Thu, 26 Aug 2021 11:51:53 -0300
Subject: [PATCH] Thumbnail fixes (#6969)
* Fix Newly-uploaded thumbnail stays blank
* Fix ChannelThumbnail fallback broken
* Hide earnings for pending
---
ui/component/channelEdit/view.jsx | 27 +++++++++++++++----------
ui/component/channelThumbnail/view.jsx | 24 ++++++++++++++--------
ui/component/publishForm/view.jsx | 3 ++-
ui/component/publishFormErrors/view.jsx | 3 ++-
ui/component/selectThumbnail/view.jsx | 23 ++++++++++++++-------
ui/page/channels/index.js | 25 +++++++++++++++++------
ui/page/channels/view.jsx | 16 +++++++++++----
7 files changed, 83 insertions(+), 38 deletions(-)
diff --git a/ui/component/channelEdit/view.jsx b/ui/component/channelEdit/view.jsx
index 0ba9e4bac..3e84e40ff 100644
--- a/ui/component/channelEdit/view.jsx
+++ b/ui/component/channelEdit/view.jsx
@@ -108,7 +108,7 @@ function ChannelForm(props: Props) {
if (isClaimingInitialRewards) {
return __('Claiming credits...');
}
- return creatingChannel || updatingChannel ? __('Submitting') : __('Submit');
+ return creatingChannel || updatingChannel ? __('Submitting...') : __('Submit');
}, [isClaimingInitialRewards, creatingChannel, updatingChannel]);
const submitDisabled = React.useMemo(() => {
return (
@@ -121,7 +121,17 @@ function ChannelForm(props: Props) {
bidError ||
(isNewChannel && !params.name)
);
- }, [isClaimingInitialRewards, creatingChannel, updatingChannel, nameError, thumbError, coverError, bidError, isNewChannel, params.name]);
+ }, [
+ isClaimingInitialRewards,
+ creatingChannel,
+ updatingChannel,
+ nameError,
+ thumbError,
+ coverError,
+ bidError,
+ isNewChannel,
+ params.name,
+ ]);
function getChannelParams() {
// fill this in with sdk data
@@ -297,13 +307,8 @@ function ChannelForm(props: Props) {
(coverError && isUpload.cover ? (
{__('This will be visible in a few minutes.')}
) : (
- setCoverError(true)}
- />
- )
- )}
+ setCoverError(true)} />
+ ))}