chore: move badges to top half of user profile

This commit is contained in:
Paul Makles
2023-06-11 13:02:38 +01:00
parent 5b600bec20
commit 75d07ffe0f
2 changed files with 19 additions and 19 deletions

View File

@@ -236,6 +236,21 @@ export const UserProfile = observer(
</IconButton>
)}
</div>
{badges > 0 && (
<div
style={{
marginInline: "1em",
padding: "0.5em",
background: "var(--primary-background)",
borderRadius: "8px",
width: "fit-content",
backgroundColor:
"rgba(var(--primary-header-rgb), max(var(--min-opacity), 0.65))",
backdropFilter: "blur(20px)",
}}>
<UserBadges badges={badges} uid={user._id} />
</div>
)}
<div className={styles.tabs}>
<div
data-active={tab === "profile"}
@@ -267,10 +282,7 @@ export const UserProfile = observer(
</div>
<div className={styles.content}>
{tab === "profile" &&
(profile?.content ||
badges > 0 ||
flags > 0 ||
user.bot ? (
(profile?.content || flags > 0 || user.bot ? (
<div>
{flags & 1 ? (
/** ! FIXME: i18n this area */
@@ -320,17 +332,6 @@ export const UserProfile = observer(
</div>
</>
) : undefined}
{badges > 0 && (
<div className={styles.category}>
<Text id="app.special.popovers.user_profile.sub.badges" />
</div>
)}
{badges > 0 && (
<UserBadges
badges={badges}
uid={user._id}
/>
)}
{profile?.content && (
<>
<div className={styles.category}>