regionals
This commit is contained in:
@@ -55,10 +55,10 @@ const TeamList = ({ teams, loading = false, onTeamClick }: TeamListProps) => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleClick = useCallback(
|
||||
(teamId: string) => {
|
||||
(teamId: string, priv: boolean) => {
|
||||
if (onTeamClick) {
|
||||
onTeamClick(teamId);
|
||||
} else {
|
||||
} else if (!priv) {
|
||||
navigate({ to: `/teams/${teamId}` });
|
||||
}
|
||||
},
|
||||
@@ -100,7 +100,7 @@ const TeamList = ({ teams, loading = false, onTeamClick }: TeamListProps) => {
|
||||
/>
|
||||
}
|
||||
style={{ cursor: "pointer" }}
|
||||
onClick={() => handleClick(team.id)}
|
||||
onClick={() => handleClick(team.id, team.private)}
|
||||
styles={{
|
||||
itemWrapper: { width: "100%" },
|
||||
itemLabel: { width: "100%" },
|
||||
|
||||
@@ -19,6 +19,7 @@ export interface Team {
|
||||
updated: string;
|
||||
players: PlayerInfo[];
|
||||
tournaments: TournamentInfo[];
|
||||
private: boolean;
|
||||
}
|
||||
|
||||
export interface TeamInfo {
|
||||
@@ -28,6 +29,7 @@ export interface TeamInfo {
|
||||
accent_color: string;
|
||||
logo?: string;
|
||||
players: PlayerInfo[];
|
||||
private: boolean;
|
||||
}
|
||||
|
||||
export const teamInputSchema = z
|
||||
|
||||
Reference in New Issue
Block a user