From 2d0bfe229768a90abda0c397072bcc534a67c4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Forment?= Date: Fri, 3 Oct 2025 23:39:58 +0200 Subject: [PATCH] stop button --- src/App.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 35562b21..abbc0e35 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,6 @@ import { useState, useRef, useEffect } from 'react' import { useStore } from '@nanostores/react' +import { Square } from 'lucide-react' import { PlaybackManager } from './services/PlaybackManager' import { DownloadService } from './services/DownloadService' import { generateFormulaGrid, generateRandomFormula } from './utils/bytebeatFormulas' @@ -168,12 +169,30 @@ function App() { } } + const handleStop = () => { + playbackManagerRef.current?.stop() + setPlaying(null) + setQueued(null) + if (animationFrameRef.current) { + cancelAnimationFrame(animationFrameRef.current) + animationFrameRef.current = null + } + } + return (

BRUITISTE

+