polish(midsummer): guard frog-hop against rapid re-click stacking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-19 09:33:51 +02:00
parent 3cd2165c15
commit 1f86e7cc86

View file

@ -62,6 +62,9 @@ export const Sidebar: React.FC<Props> = ({
<span className="ml-sidebar-title" style={{ cursor: 'pointer' }} onClick={() => {
// 🐸 Små grodorna hop — bounce the whole layout and send frogs
// leaping up the screen. Replaces the old rickroll.
// Ignore rapid re-clicks while a hop is already in flight so the
// frog layers and their cleanup timers don't stack.
if (document.querySelector('.ms-hop-frogs')) return;
const layout = document.querySelector('.ml-layout') as HTMLElement | null;
if (layout) {
layout.classList.remove('ms-hop');