Skip to content

fix(votes): auto-hide success banner after 10 s - #118

Merged
DavidSchmidt00 merged 1 commit into
stagingfrom
claude/fix-padel-agent-93-GvGhn
May 19, 2026
Merged

DavidSchmidt00 merged 1 commit into
stagingfrom
claude/fix-padel-agent-93-GvGhn

Conversation

@DavidSchmidt00

Copy link
Copy Markdown
Owner

Problem

sessionSubmitted is React state local to VotePage. Since the SPA doesn't always unmount VotePage on navigation (e.g. switching to Find and back), the "Verfügbarkeit gespeichert" banner stayed visible indefinitely within the same session.

Fix

A useEffect watches sessionSubmitted and clears it after 10 s via setTimeout. The cleanup function cancels the timer if the component unmounts early, so there are no stale state updates.

Behaviour after fix

  • Submit → banner shows for ~10 s, then disappears quietly
  • Navigate away and back within 10 s → banner still counting down
  • Navigate away and back after 10 s → banner already gone
  • Close app / new session → correctly quiet (localStorage path unchanged)

https://claude.ai/code/session_01Y9SKqkQP7DxXSe1TnXynin


Generated by Claude Code

sessionSubmitted resets via useEffect timeout so the "Verfügbarkeit
gespeichert" banner disappears ~10 s after submit, even if the user
navigates away and back within the same SPA session.

Co-Authored-By: AI Agent <noreply@agent>
@DavidSchmidt00
DavidSchmidt00 merged commit c6ea92f into staging May 19, 2026
1 check passed
@DavidSchmidt00
DavidSchmidt00 deleted the claude/fix-padel-agent-93-GvGhn branch May 19, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants