Skip to content

Commit

Permalink
Record rating display tweaks (#29)
Browse files Browse the repository at this point in the history
* Record rating display tweaks

* fix label
  • Loading branch information
Starmordar authored Oct 7, 2023
1 parent fee7422 commit b44418c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions frontend/src/containers/Profile/PvpBrackets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,34 +67,36 @@ const PvpBracket = ({
)}

<div className="hidden sm:flex sm:flex-col rounded-lg absolute top-0 right-0 px-2 pt-2 bg-[#030303e6]">
{bracket?.season_max_rating && bracket.season_max_rating !== -1 ? (
{bracket?.season_max_rating &&
bracket.season_max_rating !== -1 &&
bracket?.season_max_rating !== bracket?.max_rating ? (
<Tooltip
placement="right"
title={`Season highest achieved at ${dayjs(
title={`Season record achieved at ${dayjs(
bracket.season_max_rating_achieved_timestamp
).format('MM.DD.YY')}`}
>
<div className="flex gap-2 flex-row justify-center items-center text-[#60A5FACC]">
<span className="text-base">Season</span>
<span className="text-white text-xs sm:text-base flex items-end">
<span className="text-white text-xs sm:text-base flex items-center">
{bracket.season_max_rating}
<InfoOutlinedIcon fontSize="small" className="mb-2 !ml-1 !w-4 !h-4" />
<InfoOutlinedIcon fontSize="small" className="!ml-1 !w-4 !h-4" />
</span>
</div>
</Tooltip>
) : null}
{bracket?.max_rating && bracket.max_rating !== -1 ? (
<Tooltip
placement="right"
title={`Highest achieved at ${dayjs(bracket.max_rating_achieved_timestamp).format(
title={`Record achieved at ${dayjs(bracket.max_rating_achieved_timestamp).format(
'MM.DD.YY'
)}`}
>
<div className="flex gap-2 flex-row justify-center items-center text-[#60A5FACC]">
<span className="text-base">Highest</span>
<span className="text-white text-xs sm:text-base flex items-end">
<span className="text-base">Record</span>
<span className="text-white text-xs sm:text-base flex items-center">
{bracket.max_rating}
<InfoOutlinedIcon fontSize="small" className="mb-2 !ml-1 !w-4 !h-4" />
<InfoOutlinedIcon fontSize="small" className="!ml-1 !w-4 !h-4" />
</span>
</div>
</Tooltip>
Expand Down

0 comments on commit b44418c

Please sign in to comment.