fixing flow errors

This commit is contained in:
Anthony 2021-08-10 22:57:01 +02:00
parent b41eeec78e
commit 891512881c
No known key found for this signature in database
GPG key ID: C386D3C93D50E356
2 changed files with 8 additions and 9 deletions

View file

@ -163,7 +163,7 @@ export default function LivestreamComments(props: Props) {
<div className="card livestream__discussion">
<div className="card__header--between livestream-discussion__header">
<div className="livestream-discussion__title">{__('Live discussion')}</div>
{superChatsTotalAmount > 0 && (
{(superChatsTotalAmount || 0) > 0 && (
<div className="recommended-content__toggles">
{/* the superchats in chronological order button */}
@ -187,8 +187,8 @@ export default function LivestreamComments(props: Props) {
})}
label={
<>
<CreditAmount amount={superChatsTotalAmount} size={8} /> /
<CreditAmount amount={superChatsFiatAmount} size={8} isFiat /> {' '}{__('Tipped')}
<CreditAmount amount={superChatsTotalAmount || 0} size={8} /> /
<CreditAmount amount={superChatsFiatAmount || 0} size={8} isFiat /> {' '}{__('Tipped')}
</>
}
onClick={function() {
@ -208,7 +208,7 @@ export default function LivestreamComments(props: Props) {
</div>
)}
<div ref={commentsRef} className="livestream__comments-wrapper">
{viewMode === VIEW_MODE_CHAT && superChatsTotalAmount > 0 && superChatsByTipAmount && (
{viewMode === VIEW_MODE_CHAT && superChatsByTipAmount && (superChatsTotalAmount || 0) > 0 && (
<div className="livestream-superchats__wrapper">
<div className="livestream-superchats__inner">
{superChatsByTipAmount.map((superChat: Comment) => (

View file

@ -621,16 +621,15 @@ function WalletSendTip(props: Props) {
)}
</>
// if it's LBC and there is no balance, you can prompt to purchase LBC
:
<Card
title={<I18nMessage tokens={{ lbc: <LbcSymbol size={22} /> }}>Supporting content requires %lbc%</I18nMessage>}
subtitle={
: <Card
title={<I18nMessage tokens={{ lbc: <LbcSymbol size={22} /> }}>Supporting content requires %lbc%</I18nMessage>}
subtitle={
<I18nMessage tokens={{ lbc: <LbcSymbol /> }}>
With %lbc%, you can send tips to your favorite creators, or help boost their content for more people to
see.
</I18nMessage>
}
actions={
actions={
<div className="section__actions">
<Button
icon={ICONS.REWARDS}