diff --git a/frontend/src/components/tables/scrimmaging/TeamsTable.tsx b/frontend/src/components/tables/scrimmaging/TeamsTable.tsx index 99ad85d77..7c204d2a7 100644 --- a/frontend/src/components/tables/scrimmaging/TeamsTable.tsx +++ b/frontend/src/components/tables/scrimmaging/TeamsTable.tsx @@ -45,12 +45,18 @@ const TeamsTable: React.FC = ({ const canRequestTeam = useCallback( (team: TeamPublic) => { if (!episodeInfo.isSuccess || episodeInfo.data.frozen) return false; + if (!userTeam.isSuccess) return false; + + const isNotLowerRanked = + (team.profile?.rating ?? Number.NEGATIVE_INFINITY) >= + (userTeam.data.profile?.rating ?? Number.POSITIVE_INFINITY); return ( - team.profile?.auto_accept_reject_ranked !== + isNotLowerRanked && + (team.profile?.auto_accept_reject_ranked !== ScrimmageRequestAcceptRejectEnum.R || - team.profile.auto_accept_reject_unranked !== - ScrimmageRequestAcceptRejectEnum.R + team.profile.auto_accept_reject_unranked !== + ScrimmageRequestAcceptRejectEnum.R) ); }, [episodeInfo],