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/fixes #312

Merged
merged 3 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/app/(dashboard)/dashboard/team/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const Page = () => {
</>
)}
</div>
<div className={styles.singleInfo}>
{/* <div className={styles.singleInfo}>
<strong> {isSolo ? 'Places' : 'Equipes'} libres :</strong>{' '}
<div
className={
Expand All @@ -264,7 +264,7 @@ const Page = () => {
}>
{slotsTournament[team.tournamentId].available} / {slotsTournament[team.tournamentId].total}
</div>
</div>
</div> */}
</div>
</div>
<div className={styles.members}>
Expand Down
6 changes: 3 additions & 3 deletions src/app/tournaments/[id]/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { notFound } from 'next/navigation';
import TournamentSwitcherAnimation from '@/components/landing/TournamentSwitcherAnimation';
import { useState } from 'react';
import { useAppSelector } from '@/lib/hooks';
import Table from '@/components/UI/Table';
// import Table from '@/components/UI/Table';
import { getTournamentBackgroundLink, getTournamentRulesLink } from '@/utils/uploadLink';
import { IconName } from '@/components/UI/Icon';
import logoUA from '@/../public/images/logo-notext.png';
Expand Down Expand Up @@ -98,7 +98,7 @@ export function TournamentInformation({ tournamentId, animate = true }: { tourna
fullness={animate ? (tournament.lockedTeamsCount * tournament.playersPerTeam) / tournament.maxPlayers : 0}
className={styles.fillingBar}
/>
{loginAllowed && (
{/* {loginAllowed && (
<Table
className={styles.table}
columns={
Expand Down Expand Up @@ -132,7 +132,7 @@ export function TournamentInformation({ tournamentId, animate = true }: { tourna
},
)}
/>
)}
)} */}
</div>
</TournamentSwitcherAnimation>
);
Expand Down
12 changes: 4 additions & 8 deletions src/components/dashboard/TournamentModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ const TournamentModal = ({
const id = tournament?.id || null;
const [name, setName] = useState(tournament?.name || null);
const [maxPlayers, setMaxPlayers] = useState(tournament?.maxPlayers || null);
const [playersPerTeam, setPlayersPerTeam] = useState(tournament?.playersPerTeam || null);
const [coachesPerTeam, setCoachesPerTeam] = useState(tournament?.coachesPerTeam || null);
const [infos, setInfos] = useState(tournament?.infos || null);
const [format, setFormat] = useState(tournament?.format || null);
const [cashprize, setCashprize] = useState(tournament?.cashprize || null);
Expand Down Expand Up @@ -54,8 +52,6 @@ const TournamentModal = ({
id: id! ?? '',
name: name ?? '',
maxPlayers: maxPlayers ?? 0,
playersPerTeam: playersPerTeam ?? 0,
coachesPerTeam: coachesPerTeam ?? 0,
lockedTeamsCount: 0,
placesLeft: 0,
infos: infos,
Expand Down Expand Up @@ -90,14 +86,14 @@ const TournamentModal = ({
<Input
label="Nombre de joueurs par équipe"
type="number"
value={playersPerTeam ?? ''}
onChange={(e) => setPlayersPerTeam(parseInt(e))}
disabled={true}
value={tournament?.playersPerTeam ?? ''}
/>
<Input
label="Nombre maximal de coachs par équipe"
type="number"
value={coachesPerTeam ?? ''}
onChange={(e) => setCoachesPerTeam(parseInt(e))}
disabled={true}
value={tournament?.coachesPerTeam ?? ''}
/>
<Input label="Infos" value={infos ?? ''} onChange={setInfos} />
<Textarea label="Format" value={format ?? ''} onChange={setFormat} />
Expand Down
2 changes: 0 additions & 2 deletions src/modules/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ export const updateTournament =
const data = {
name: tournament.name,
maxPlayers: tournament.maxPlayers,
playersPerTeam: tournament.playersPerTeam,
coachesPerTeam: tournament.coachesPerTeam,
display: tournament.display.toString(),
displayCasters: tournament.displayCasters.toString(),
displayCashprize: tournament.displayCashprize.toString(),
Expand Down