Группа: не дублировать название группы в блоке текущей игры

На главной партии приходят из разных групп, поэтому название нужно; на
странице самой группы оно повторяет заголовок страницы. Блок получил
проп showGroupName (по умолчанию true) — главная не меняется.

#2

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ps52xzuUXnWrJ5SRnEeaLk
This commit is contained in:
2026-09-07 16:35:10 +03:00
co-authored by Claude Opus 5
parent b3e4f71bda
commit 1790e195e0
2 changed files with 13 additions and 3 deletions
+11 -2
View File
@@ -4,7 +4,16 @@ import { useNavigate } from "react-router-dom";
import { formatTime, plural } from "../domain/format";
import type { HomeInProgressMatch } from "../domain/types";
export function InProgressMatches({ items }: { items: HomeInProgressMatch[] }) {
/** Блок незавершённых партий. На главной партии приходят из разных групп, поэтому
* название группы нужно; на странице самой группы оно дублирует заголовок — там
* блок вызывается с showGroupName={false}. */
export function InProgressMatches({
items,
showGroupName = true,
}: {
items: HomeInProgressMatch[];
showGroupName?: boolean;
}) {
const navigate = useNavigate();
if (items.length === 0) return null;
@@ -21,7 +30,7 @@ export function InProgressMatches({ items }: { items: HomeInProgressMatch[] }) {
>
<div style={{ minWidth: 0 }}>
<div className="row" style={{ gap: 8 }}>
<b>{m.group_name}</b>
{showGroupName && <b>{m.group_name}</b>}
<span className="badge badge-live">идёт</span>
</div>
<div className="muted small">