From 815b675aa3dbc97e3c738362d6100e36e3960980 Mon Sep 17 00:00:00 2001 From: Teddy Roncin Date: Wed, 8 Nov 2023 13:28:33 +0100 Subject: [PATCH] Fix/fixes (#321) * fix: added commas between casters * fix: trash icon style in /admin/tournaments --- src/app/tournaments/[id]/content.tsx | 2 +- src/app/tournaments/content.tsx | 2 +- .../dashboard/TournamentModal.module.scss | 48 +++++++++---------- src/components/dashboard/TournamentModal.tsx | 3 +- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/app/tournaments/[id]/content.tsx b/src/app/tournaments/[id]/content.tsx index e272c9a4..f9927d5f 100644 --- a/src/app/tournaments/[id]/content.tsx +++ b/src/app/tournaments/[id]/content.tsx @@ -92,7 +92,7 @@ export function TournamentInformation({ tournamentId, animate = true }: { tourna ? 'À venir' : tournament.casters.length === 0 ? 'Aucun caster pour ce tournoi' - : tournament.casters?.map((caster) => caster.name + ' ')} + : tournament.casters?.map((caster) => caster.name).join(', ')} {loginAllowed && diff --git a/src/app/tournaments/content.tsx b/src/app/tournaments/content.tsx index 697f842a..7df4f36e 100644 --- a/src/app/tournaments/content.tsx +++ b/src/app/tournaments/content.tsx @@ -264,7 +264,7 @@ export function TournamentHome({

{renderedTournament.casters !== null && renderedTournament.casters.length > 0 && ( <> - Casté par {renderedTournament.casters?.map((caster) => caster.name + ' ')} + Casté par {renderedTournament.casters?.map((caster) => caster.name).join(', ')} )}

diff --git a/src/components/dashboard/TournamentModal.module.scss b/src/components/dashboard/TournamentModal.module.scss index a3ef16c4..a728638b 100644 --- a/src/components/dashboard/TournamentModal.module.scss +++ b/src/components/dashboard/TournamentModal.module.scss @@ -1,35 +1,35 @@ .casters { - display: flex; - justify-content: space-between; - align-items: center; - margin-top: 1rem; - margin-bottom: 1rem; + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 1rem; + margin-bottom: 1rem; - >p{ - font-size: 1rem; - font-weight: 600; - } + > p { + font-size: 1rem; + font-weight: 600; + } } .caster { - display: flex; - justify-content: space-between; - align-items: flex-end; - gap: 1rem; + display: flex; + justify-content: space-between; + align-items: flex-end; + gap: 1rem; - >button { - margin: 1.25rem 0; - padding: 0.75rem 1rem; - >svg{ - width: 24px; - } + > button { + margin: 1.25rem 0; + padding: 0.75rem 1rem; + svg { + width: 24px; } + } } .displayCheckboxes { - display: flex; - column-gap: 1rem; - row-gap: 0.5rem; - flex-wrap: wrap; - margin-bottom: 2rem; + display: flex; + column-gap: 1rem; + row-gap: 0.5rem; + flex-wrap: wrap; + margin-bottom: 2rem; } diff --git a/src/components/dashboard/TournamentModal.tsx b/src/components/dashboard/TournamentModal.tsx index 0ad28247..ee42daff 100644 --- a/src/components/dashboard/TournamentModal.tsx +++ b/src/components/dashboard/TournamentModal.tsx @@ -131,8 +131,7 @@ const TournamentModal = ({ setCasters(newCasters); setCastersCount(castersCount - 1); }}> - {/* TODO: make it work */} - + ))}