mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-07 11:46:09 -05:00
Add links to admin team management table
This commit is contained in:
@@ -13,7 +13,7 @@ import {
|
||||
X,
|
||||
} from "lucide-react";
|
||||
import * as React from "react";
|
||||
import { useFetcher } from "react-router";
|
||||
import { Link, useFetcher } from "react-router";
|
||||
import { Avatar } from "~/components/Avatar";
|
||||
import { LinkButton, SendouButton } from "~/components/elements/Button";
|
||||
import { SendouMenu, SendouMenuItem } from "~/components/elements/Menu";
|
||||
@@ -29,9 +29,10 @@ import { useTournament } from "~/features/tournament/routes/to.$id";
|
||||
import type { Tournament } from "~/features/tournament-bracket/core/Tournament";
|
||||
import type { TournamentDataTeam } from "~/features/tournament-bracket/core/Tournament.server";
|
||||
import {
|
||||
teamPage,
|
||||
tournamentAdminRegistrationEditPage,
|
||||
tournamentAdminRegistrationPage,
|
||||
tournamentTeamPage,
|
||||
userPage,
|
||||
} from "~/utils/urls";
|
||||
import { queryToUserIdentifier } from "~/utils/users";
|
||||
import { ExportDialog } from "../components/ExportDialog";
|
||||
@@ -165,19 +166,16 @@ function TeamRow({
|
||||
<td>
|
||||
<div className="stack horizontal sm items-center">
|
||||
<Avatar size="xxs" url={logoSrc} identiconInput={team.name} />
|
||||
{team.team ? (
|
||||
<a
|
||||
href={teamPage(team.team.customUrl ?? "")}
|
||||
className={styles.teamName}
|
||||
data-testid="team-name"
|
||||
>
|
||||
{team.name}
|
||||
</a>
|
||||
) : (
|
||||
<span className={styles.teamName} data-testid="team-name">
|
||||
{team.name}
|
||||
</span>
|
||||
)}
|
||||
<Link
|
||||
to={tournamentTeamPage({
|
||||
tournamentId: tournament.ctx.id,
|
||||
tournamentTeamId: team.id,
|
||||
})}
|
||||
className={styles.teamName}
|
||||
data-testid="team-name"
|
||||
>
|
||||
{team.name}
|
||||
</Link>
|
||||
</div>
|
||||
</td>
|
||||
{!tournament.ctx.isFinalized ? (
|
||||
@@ -193,14 +191,15 @@ function TeamRow({
|
||||
return (
|
||||
<td key={`player-${i}`}>
|
||||
{member ? (
|
||||
<span
|
||||
<Link
|
||||
to={userPage(member)}
|
||||
className={clsx("stack horizontal xxs items-center", {
|
||||
"font-bold": member.role === "OWNER",
|
||||
})}
|
||||
>
|
||||
{member.role === "OWNER" ? "(C) " : null}
|
||||
{member.username}
|
||||
</span>
|
||||
</Link>
|
||||
) : null}
|
||||
</td>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user