Skip to content

Commit f7cf7d1

Browse files
authored
[QA-1448] Fix user badge spacing (#9302)
1 parent 5af538a commit f7cf7d1

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

packages/web/src/components/track/GatedContentSection.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -639,20 +639,22 @@ export const GatedContentSection = ({
639639
mouseEnterDelay={0.1}
640640
component='span'
641641
>
642-
<h2
643-
className={styles.gatedContentOwner}
644-
onClick={() =>
645-
dispatch(pushRoute(profilePage(emptyStringGuard(entity.handle))))
646-
}
647-
>
648-
{entity.name}
642+
<Flex gap='xs' alignItems='center'>
643+
<h2
644+
className={styles.gatedContentOwner}
645+
onClick={() =>
646+
dispatch(pushRoute(profilePage(emptyStringGuard(entity.handle))))
647+
}
648+
>
649+
{entity.name}
650+
</h2>
649651
<UserBadges
650652
userId={entity.user_id}
651653
className={styles.badgeIcon}
652654
badgeSize={14}
653655
useSVGTiers
654656
/>
655-
</h2>
657+
</Flex>
656658
</ArtistPopover>
657659
),
658660
[dispatch]
@@ -661,7 +663,7 @@ export const GatedContentSection = ({
661663
if (!streamConditions) return null
662664
if (!shouldDisplay) return null
663665

664-
if (hasStreamAccess) {
666+
if (!hasStreamAccess) {
665667
return (
666668
<div className={cn(styles.gatedContentSection, fadeIn, wrapperClassName)}>
667669
<UnlockedGatedContentSection
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.container {
22
display: flex;
33
overflow: visible;
4+
gap: 4px;
45
}
56

6-
.container svg,
7-
.inlineContainer svg {
7+
.inlineContainer svg:first-child {
88
margin-right: 4px !important;
99
}

packages/web/src/components/user-badges/UserBadges.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,16 @@ const UserBadges = ({
101101

102102
if (!hasContent) return null
103103

104-
if (inline) {
105-
return (
106-
<span className={cn(styles.inlineContainer, className)}>
107-
{(isVerifiedOverride ?? isVerified) && (
108-
<IconVerified height={badgeSize} width={badgeSize} />
109-
)}
110-
{audioBadge &&
111-
cloneElement(audioBadge, { height: badgeSize, width: badgeSize })}
112-
</span>
113-
)
114-
}
115104
return (
116-
<span className={cn(styles.container, className)}>
105+
<span
106+
className={cn(
107+
{
108+
[styles.inlineContainer]: inline,
109+
[styles.container]: !inline
110+
},
111+
className
112+
)}
113+
>
117114
{(isVerifiedOverride ?? isVerified) && (
118115
<IconVerified height={badgeSize} width={badgeSize} />
119116
)}

0 commit comments

Comments
 (0)