fix: separate connection indicator script from patchable element
All checks were successful
CI / Deploy / test (pull_request) Successful in 14s
CI / Deploy / lint (pull_request) Successful in 25s
CI / Deploy / deploy (pull_request) Has been skipped

The script was being re-added on every SSE patch, creating multiple
setInterval timers. Split into ConnectionIndicator (for patches) and
ConnectionIndicatorWithScript (for initial page render).
This commit is contained in:
Ryan Hamamura
2026-03-03 10:39:26 -10:00
parent 589d1f09e8
commit 0e344de9c1
3 changed files with 9 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ templ GamePage(sg *snake.SnakeGame, mySlot int, messages []chat.Message, chatCfg
data-on:keydown__throttle.100ms={ keydownScript(gameID) }
tabindex="0"
>
@components.ConnectionIndicator(0)
@components.ConnectionIndicatorWithScript(0)
@GameContent(sg, mySlot, messages, chatCfg, gameID)
</main>
}