Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions src/pages/MatchResultOverlay.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,35 @@
.delta-positive { color: #4cef70; }
.delta-negative { color: #ff4444; }

/* Кнопка немедленного возврата к поиску */
.overlay-return-btn {
font-family: 'Inter', sans-serif;
font-size: 1rem;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #fff;
background: rgba(0, 0, 0, 0.55);
border: 1px solid rgba(255, 255, 255, 0.25);
border-radius: 10px;
padding: 14px 36px;
margin-top: 4px;
cursor: pointer;
backdrop-filter: blur(6px);
transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.overlay-return-btn:hover {
transform: translateY(-2px);
}
.overlay-return-win:hover {
border-color: #8ec900;
box-shadow: 0 0 24px #8ec90066;
}
.overlay-return-lose:hover {
border-color: #cc2200;
box-shadow: 0 0 24px #cc220066;
}

/* Таймер редиректа */
.overlay-timer {
font-family: 'Inter', sans-serif;
Expand Down
13 changes: 13 additions & 0 deletions src/pages/MatchResultOverlay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export default function MatchResultOverlay({ outcome, newRating, ratingDelta })

const isWin = outcome === 'WIN';

const goToBattle = () => {
clearInterval(intervalRef.current);
navigate('/battle');
};

useEffect(() => {
intervalRef.current = setInterval(() => {
setSecondsLeft((s) => {
Expand Down Expand Up @@ -48,6 +53,14 @@ export default function MatchResultOverlay({ outcome, newRating, ratingDelta })
</span>
</div>

<button
type="button"
className={`overlay-return-btn ${isWin ? 'overlay-return-win' : 'overlay-return-lose'}`}
onClick={goToBattle}
>
Вернуться к поиску
</button>

<div className="overlay-timer">
Переход на страницу поиска через {secondsLeft} сек…
</div>
Expand Down
Loading