From b3e4f71bdac1908f0824eb51d633baa681fcf96b Mon Sep 17 00:00:00 2001 From: NotBigGhost Date: Mon, 7 Sep 2026 16:02:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=93=D1=80=D1=83=D0=BF=D0=BF=D0=B0:=20=D1=82?= =?UTF-8?q?=D0=B5=D0=BA=D1=83=D1=89=D0=B0=D1=8F=20=D0=B8=D0=B3=D1=80=D0=B0?= =?UTF-8?q?=20=E2=80=94=20=D1=82=D0=B5=D0=BC=20=D0=B6=D0=B5=20=D0=B1=D0=BB?= =?UTF-8?q?=D0=BE=D0=BA=D0=BE=D0=BC,=20=D1=87=D1=82=D0=BE=20=D0=BD=D0=B0?= =?UTF-8?q?=20=D0=B3=D0=BB=D0=B0=D0=B2=D0=BD=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit На странице группы идущая партия лежала в общем списке «Партии» и отличалась от завершённых только бейджем «идёт». Теперь она выносится блоком InProgressMatches — тем же компонентом, что на главной. MatchListItem уже содержит всё, что нужно HomeInProgressMatch (started_at, player_count и тот же MatchListParticipant), поэтому бэкенд не тронут: недостающие group_id и group_name берутся из useMe/useGroup. Из списка «Партии» идущие партии исключены, иначе одна партия показывалась бы на странице дважды. #2 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Ps52xzuUXnWrJ5SRnEeaLk --- frontend/src/pages/GroupPage.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 (
@@ -152,8 +161,10 @@ export function GroupPage() { + +

Партии

- {matches && } + {matches && }
); }