);
};
+
+export const ShootoutCompactItem: React.FC<{ event: ITimelineEvent }> = ({
+ event,
+}) => (
+
+);
diff --git a/components/players/PlayerTeams.tsx b/components/players/PlayerTeams.tsx
index 360c6cb..7adf863 100644
--- a/components/players/PlayerTeams.tsx
+++ b/components/players/PlayerTeams.tsx
@@ -65,9 +65,9 @@ export const PlayerTeams: React.FC
= ({ player }) => {
)}
diff --git a/components/players/PlayerTransferts.tsx b/components/players/PlayerTransferts.tsx
index 32c089b..2271762 100644
--- a/components/players/PlayerTransferts.tsx
+++ b/components/players/PlayerTransferts.tsx
@@ -63,9 +63,9 @@ export const PlayerTransferts: React.FC = ({
)}
@@ -82,9 +82,9 @@ export const PlayerTransferts: React.FC = ({
)}
diff --git a/components/standings/ChampionshipStanding.tsx b/components/standings/ChampionshipStanding.tsx
index c3a1538..58d89aa 100644
--- a/components/standings/ChampionshipStanding.tsx
+++ b/components/standings/ChampionshipStanding.tsx
@@ -4,6 +4,7 @@ import React, { useEffect, useState } from "react";
import { ColumnDef } from "@tanstack/react-table";
import { ChampionshipService } from "@/services/ChampionshipService.ts";
import { IStanding } from "@/interfaces/IStanding";
+import { IEditionStandingRule } from "@/interfaces/IEditions";
import { Loader2 } from "lucide-react";
import { StandingDataTable } from "./StandingDataTable";
@@ -17,6 +18,7 @@ export const ChampionshipStanding: React.FC = ({
editionId,
}) => {
const [standings, setStandings] = useState([]);
+ const [rules, setRules] = useState([]);
const [isDataLoading, setIsDataLoading] = useState(false);
const [groups, setGroups] = useState([]);
@@ -24,11 +26,12 @@ export const ChampionshipStanding: React.FC = ({
const getStandings = async () => {
setIsDataLoading(true);
try {
- const data =
- await ChampionshipService.getStandingsByChampionshipEdition(
- editionId
- );
+ const [data, ruleData] = await Promise.all([
+ ChampionshipService.getStandingsByChampionshipEdition(editionId),
+ ChampionshipService.getRulesByChampionshipEdition(editionId),
+ ]);
setStandings(data);
+ setRules(ruleData);
// Extract unique groups safely
const uniqueGroups = Array.from(
@@ -36,9 +39,9 @@ export const ChampionshipStanding: React.FC = ({
data
.map((s) => s.participation.group)
.filter(
- (g): g is string => g !== undefined && g !== null && g !== ""
- )
- )
+ (g): g is string => g !== undefined && g !== null && g !== "",
+ ),
+ ),
);
setGroups(uniqueGroups);
} finally {
@@ -75,14 +78,37 @@ export const ChampionshipStanding: React.FC = ({
s.participation.group === group
+ (s) => s.participation.group === group,
)}
+ rules={rules}
/>
))
) : (
-
+
+ )}
+ {rules.length > 0 && (
+
+ {rules
+ // Sort by priority or position so the legend looks organized
+ .sort((a, b) => a.priority - b.priority)
+ .map((rule) => (
+
+ ))}
+
)}