@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user