Premium Main Modal: Refactor conditional rendering logic (#5481)
This commit is contained in:
parent
c3315883eb
commit
c73edd986b
@ -27,6 +27,7 @@ import useOldLang from '../../../hooks/useOldLang';
|
|||||||
import useSyncEffect from '../../../hooks/useSyncEffect';
|
import useSyncEffect from '../../../hooks/useSyncEffect';
|
||||||
|
|
||||||
import CustomEmoji from '../../common/CustomEmoji';
|
import CustomEmoji from '../../common/CustomEmoji';
|
||||||
|
import Icon from '../../common/icons/Icon';
|
||||||
import Button from '../../ui/Button';
|
import Button from '../../ui/Button';
|
||||||
import Modal from '../../ui/Modal';
|
import Modal from '../../ui/Modal';
|
||||||
import Transition from '../../ui/Transition';
|
import Transition from '../../ui/Transition';
|
||||||
@ -370,11 +371,9 @@ const PremiumMainModal: FC<OwnProps & StateProps> = ({
|
|||||||
onClick={() => closePremiumModal()}
|
onClick={() => closePremiumModal()}
|
||||||
ariaLabel={lang('Close')}
|
ariaLabel={lang('Close')}
|
||||||
>
|
>
|
||||||
<i className="icon icon-close" />
|
<Icon name="close" />
|
||||||
</Button>
|
</Button>
|
||||||
{isGift ? (
|
{fromUserStatusEmoji ? (
|
||||||
<img className={styles.logo} src={PremiumLogo} alt="" draggable={false} />
|
|
||||||
) : fromUserStatusEmoji ? (
|
|
||||||
<CustomEmoji
|
<CustomEmoji
|
||||||
className={styles.statusEmoji}
|
className={styles.statusEmoji}
|
||||||
onClick={handleOpenStatusSet}
|
onClick={handleOpenStatusSet}
|
||||||
@ -382,7 +381,9 @@ const PremiumMainModal: FC<OwnProps & StateProps> = ({
|
|||||||
isBig
|
isBig
|
||||||
size={STATUS_EMOJI_SIZE}
|
size={STATUS_EMOJI_SIZE}
|
||||||
/>
|
/>
|
||||||
) : undefined}
|
) : (
|
||||||
|
<img className={styles.logo} src={PremiumLogo} alt="" draggable={false} />
|
||||||
|
)}
|
||||||
<h2 className={buildClassName(styles.headerText, fromUserStatusSet && styles.stickerSetText)}>
|
<h2 className={buildClassName(styles.headerText, fromUserStatusSet && styles.stickerSetText)}>
|
||||||
{getHeaderText()}
|
{getHeaderText()}
|
||||||
</h2>
|
</h2>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user