Merge pull request 'Техническое уведомление (#38)' (#40) from issue-38-drop-finish-toast into dev

Reviewed-on: #40
This commit was merged in pull request #40.
This commit is contained in:
2026-09-09 20:21:28 +03:00
-12
View File
@@ -63,8 +63,6 @@ export function MatchDetailPage() {
const draftPayload = useRef<MatchFinishDraftData | null>(null);
const lastLocalEdit = useRef(0);
const appliedDraftAt = useRef<string | null>(null);
const iFinished = useRef(false);
const prevStatus = useRef<string | null>(null);
const sendDraft = () => {
draftTimer.current = null;
@@ -101,15 +99,6 @@ export function MatchDetailPage() {
appliedDraftAt.current = incoming.updated_at;
}, [incoming, match?.status, me?.id]);
// Партию завершил кто-то другой — форма исчезает, и без этого молча.
useEffect(() => {
if (!match) return;
if (prevStatus.current === "in_progress" && match.status === "finished" && !iFinished.current) {
toast.show("Партию завершил другой участник — показаны его результаты");
}
prevStatus.current = match.status;
}, [match, toast]);
if (isLoading) return <Spinner />;
if (!match) return <div className="muted">Партия не найдена.</div>;
@@ -146,7 +135,6 @@ export function MatchDetailPage() {
clearTimeout(draftTimer.current);
sendDraft();
}
iFinished.current = true;
const commentOf = (uid: number) => (finishComments[uid] ?? "").trim() || null;
let place = 1;
const survivors = finishBlocks.flatMap((ids) => {