Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Back to tournaments button rendering #2017 #2051

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand All @@ -203,7 +203,7 @@ function TournamentHeader({
return (
<>
<div className="col bg-white shadow-sm rounded-lg p-2">
<div className="d-flex flex-column flex-lg-row flex-md-row justify-content-between">
<div className="d-flex flex-column flex-lg-row justify-content-between">
<div className="d-flex align-items-center pb-2">
<h2
title={name}
Expand Down Expand Up @@ -247,30 +247,27 @@ function TournamentHeader({
</div>
<div className="d-flex">
{!streamMode && (
!isOver ? (
<div className="d-flex justify-items-center pb-2">
{type !== 'team' && (
<div className="mr-2 mr-lg-0">
<JoinButton
isShow={state !== TournamentStates.active || type === 'arena'}
isShowLeave={!(type === 'arena' && state === TournamentStates.active)}
isParticipant={!!players[currentUserId]}
disabled={!isOnline || !isLive}
/>
</div>
)}
</div>
) : (
<div className="d-flex justify-items-center pb-2">
<div className="d-flex justify-items-center pb-2">
{!players[currentUserId] && (
<a
className={backBtnClassName}
href="/tournaments"
>
<FontAwesomeIcon className="mr-2" icon="undo" />
{i18next.t('Back to tournaments')}
</a>
</div>
)
)}
{type !== 'team' && !isOver && (
<div className="d-flex mr-2 mr-lg-0">
<JoinButton
isShow={state !== TournamentStates.active || type === 'arena'}
isShowLeave={type !== 'arena' || state !== TournamentStates.active}
isParticipant={!!players[currentUserId]}
disabled={!isOnline || !isLive}
/>
</div>
)}
</div>
)}
<div className="d-flex justify-items-center pb-2">
{canModerate && (
Expand Down
Loading