diff --git a/frontend/src/pages/GroupPage.tsx b/frontend/src/pages/GroupPage.tsx index 783fdb7..d590680 100644 --- a/frontend/src/pages/GroupPage.tsx +++ b/frontend/src/pages/GroupPage.tsx @@ -6,6 +6,7 @@ import { ApiError } from "../api/client"; import { CreateGroupForm } from "../components/CreateGroupForm"; import { GroupInvitations } from "../components/GroupInvitations"; import { GroupSwitcher } from "../components/GroupSwitcher"; +import { InProgressMatches } from "../components/InProgressMatches"; import { Leaderboard } from "../components/Leaderboard"; import { MatchListView } from "../components/MatchList"; import { PlayerSuggestions } from "../components/PlayerSuggestions"; @@ -83,6 +84,14 @@ export function GroupPage() { ); } + // Идущие партии выносим тем же блоком, что и на главной; из списка «Партии» + // их исключаем, иначе одна партия показалась бы на странице дважды. + const allMatches = matches?.items ?? []; + const inProgress = allMatches + .filter((m) => m.status === "in_progress") + .map((m) => ({ ...m, group_id: groupId, group_name: group?.name ?? "" })); + const finishedMatches = allMatches.filter((m) => m.status !== "in_progress"); + return (