diff --git a/frontend/src/components/TableFilter/CutOffRating.tsx b/frontend/src/components/TableFilter/CutOffRating.tsx index f0e25696..f2373b2a 100644 --- a/frontend/src/components/TableFilter/CutOffRating.tsx +++ b/frontend/src/components/TableFilter/CutOffRating.tsx @@ -1,41 +1,43 @@ -import { getRatingColor, getSeasonRankImageFromRating } from '@/utils/table'; - -interface IProps { - bracket: string; - statistic: any; -} - -const ratingRewardMap = { - '3v3': 'ARENA_3v3', - rbg: 'BATTLEGROUNDS/alliance', -}; - -const CutOffText = ({ bracket, statistic }: IProps) => { - const rankOneTitleColor = getRatingColor(true); - - const rewards = statistic?.cutoffs?.rewards; - const cutOffRating = rewards?.[ratingRewardMap[bracket]]; - - return ( - - {bracket === '3v3' - ? `Verdant Gladiator: Dragonflight Season 3 - Rating: ${cutOffRating}` - : `Hero of the Alliance & Horde: Verdant - Rating: ${cutOffRating}`} - - ); -}; - -const CutOffRating = ({ bracket, statistic }: IProps) => { - if (!statistic?.cutoffs?.rewards?.ARENA_3v3 || !['rbg', '3v3'].includes(bracket)) { - return
; - } - - return ( -
- Season Rank - -
- ); -}; - -export default CutOffRating; +import { getRatingColor, getSeasonRankImageFromRating } from '@/utils/table'; + +interface IProps { + bracket: string; + statistic: any; +} + +const ratingRewardMap = { + '3v3': 'ARENA_3v3', + rbg: 'BATTLEGROUNDS/alliance', +}; + +const CutOffText = ({ bracket, statistic }: IProps) => { + const rankOneTitleColor = getRatingColor(true); + + const rewards = statistic?.cutoffs?.rewards; + const spotWithNoAlts = statistic?.cutoffs?.spotWithNoAlts + const cutOffRating = rewards?.[ratingRewardMap[bracket]]; + const spotsWithNoAlts = spotWithNoAlts?.[ratingRewardMap[bracket]]; + + return ( + + {bracket === '3v3' + ? `Verdant Gladiator: Dragonflight Season 3 - Rating: ${cutOffRating}. Spots: ${spotsWithNoAlts}` + : `Hero of the Alliance & Horde: Verdant - Rating: ${cutOffRating}. Spots: ${spotsWithNoAlts}`} + + ); +}; + +const CutOffRating = ({ bracket, statistic }: IProps) => { + if (!statistic?.cutoffs?.rewards?.ARENA_3v3 || !['rbg', '3v3'].includes(bracket)) { + return
; + } + + return ( +
+ Season Rank + +
+ ); +}; + +export default CutOffRating;