Skip to content

Commit

Permalink
Merge pull request #140 from osu-tournament-rating/feature/127
Browse files Browse the repository at this point in the history
  • Loading branch information
hburn7 authored Mar 23, 2024
2 parents fc99d5e + ce3d07e commit c9bc45c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
9 changes: 9 additions & 0 deletions components/Profile/UserMainCard/UserMainCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,12 @@
.item .value {
font-weight: 600;
}

.item .image {
position: relative;
display: flex;
flex-flow: row;
height: 1.13em;
aspect-ratio: 1;
margin: auto;
}
23 changes: 21 additions & 2 deletions components/Profile/UserMainCard/UserMainCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';
import Image from 'next/image';
import { Tooltip } from 'react-tooltip';
import styles from './UserMainCard.module.css';

export default function UserMainCardProfile({
Expand Down Expand Up @@ -56,8 +57,26 @@ export default function UserMainCardProfile({
</div>
<div className={styles.item} id="Tier">
<div className={styles.label}>Tier</div>
<div className={styles.value}>
{generalStats?.rankProgress.currentTier}
<div className={styles.image}>
<Tooltip
id={`tooltip-${generalStats?.rankProgress.currentTier}`}
style={{
borderRadius: '0.6em',
fontWeight: '500',
fontSize: '0.7em',
background: 'hsl(0,0%,82%)',
color: '#333',
}}
place={'right'}
/>
<Image
src={`/icons/ranks/${generalStats?.rankProgress.currentTier}.svg`}
alt={generalStats?.rankProgress.currentTier}
data-tooltip-id={`tooltip-${generalStats?.rankProgress.currentTier}`}
data-tooltip-content={generalStats?.rankProgress.currentTier}
data-tooltip-delay-show={400}
fill
/>
</div>
</div>
</div>
Expand Down

0 comments on commit c9bc45c

Please sign in to comment.