From 0ae1f573a4379ccae57c2eb0435e97629ba51f49 Mon Sep 17 00:00:00 2001 From: Artjom Kivonen Date: Sat, 11 Jan 2025 17:06:21 +0200 Subject: [PATCH] Fix Back to tournaments button rendering #2017 --- .../pages/tournament/TournamentHeader.jsx | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/services/app/apps/codebattle/assets/js/widgets/pages/tournament/TournamentHeader.jsx b/services/app/apps/codebattle/assets/js/widgets/pages/tournament/TournamentHeader.jsx index 2bde04b10..f2cbca3f8 100644 --- a/services/app/apps/codebattle/assets/js/widgets/pages/tournament/TournamentHeader.jsx +++ b/services/app/apps/codebattle/assets/js/widgets/pages/tournament/TournamentHeader.jsx @@ -179,7 +179,7 @@ function TournamentHeader({ 'btn-secondary': !hasCustomEventStyle, 'cb-custom-event-btn-secondary': hasCustomEventStyle, }); - const backBtnClassName = cn('btn rounded-lg ml-lg-2 ml-md-2 mr-2', { + const backBtnClassName = cn('btn rounded-lg ml-lg-2 mr-2', { 'btn-primary': !hasCustomEventStyle, 'cb-custom-event-btn-primary': hasCustomEventStyle, }); @@ -203,7 +203,7 @@ function TournamentHeader({ return ( <>
-
+

{!streamMode && ( - !isOver ? ( -
- {type !== 'team' && ( -
- -
- )} -
- ) : ( -
+
+ {!players[currentUserId] && ( {i18next.t('Back to tournaments')} -
- ) + )} + {type !== 'team' && !isOver && ( +
+ +
+ )} +
)}
{canModerate && (