Remove the delayed thumbnail message for ChannelEdit

Not necessary now that we don't need confirmations for thumbnails (direct upload to CDN)
This commit is contained in:
infinite-persistence 2021-12-15 10:43:21 +08:00 committed by Thomas Zarebczan
parent 39a4cb3d77
commit a0e073b416
2 changed files with 13 additions and 23 deletions

View file

@ -322,7 +322,6 @@ function ChannelForm(props: Props) {
uri={uri} uri={uri}
thumbnailPreview={thumbnailPreview} thumbnailPreview={thumbnailPreview}
allowGifs allowGifs
showDelayedMessage={isUpload.thumbnail}
setThumbUploadError={setThumbError} setThumbUploadError={setThumbError}
thumbUploadError={thumbError} thumbUploadError={thumbError}
/> />

View file

@ -20,10 +20,8 @@ type Props = {
claim: ?ChannelClaim, claim: ?ChannelClaim,
doResolveUri: (string) => void, doResolveUri: (string) => void,
isResolving: boolean, isResolving: boolean,
showDelayedMessage?: boolean,
noLazyLoad?: boolean, noLazyLoad?: boolean,
hideStakedIndicator?: boolean, hideStakedIndicator?: boolean,
xsmall?: boolean,
noOptimization?: boolean, noOptimization?: boolean,
setThumbUploadError: (boolean) => void, setThumbUploadError: (boolean) => void,
ThumbUploadError: boolean, ThumbUploadError: boolean,
@ -42,7 +40,6 @@ function ChannelThumbnail(props: Props) {
claim, claim,
doResolveUri, doResolveUri,
isResolving, isResolving,
showDelayedMessage = false,
noLazyLoad, noLazyLoad,
hideStakedIndicator = false, hideStakedIndicator = false,
setThumbUploadError, setThumbUploadError,
@ -91,25 +88,19 @@ function ChannelThumbnail(props: Props) {
'channel-thumbnail--resolving': isResolving, 'channel-thumbnail--resolving': isResolving,
})} })}
> >
{showDelayedMessage ? ( <OptimizedImage
<div className="channel-thumbnail--waiting"> alt={__('Channel profile picture')}
{__('This will be visible in a few minutes after you submit this form.')} className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'}
</div> src={(!thumbLoadError && channelThumbnail) || defaultAvatar}
) : ( loading={noLazyLoad ? undefined : 'lazy'}
<OptimizedImage onError={() => {
alt={__('Channel profile picture')} if (setThumbUploadError) {
className={!channelThumbnail ? 'channel-thumbnail__default' : 'channel-thumbnail__custom'} setThumbUploadError(true);
src={(!thumbLoadError && channelThumbnail) || defaultAvatar} } else {
loading={noLazyLoad ? undefined : 'lazy'} setThumbLoadError(true);
onError={() => { }
if (setThumbUploadError) { }}
setThumbUploadError(true); />
} else {
setThumbLoadError(true);
}
}}
/>
)}
{!hideStakedIndicator && <ChannelStakedIndicator uri={uri} claim={claim} />} {!hideStakedIndicator && <ChannelStakedIndicator uri={uri} claim={claim} />}
</div> </div>
); );