Nightly: Rainbow-Flash fix React-Event verwenden (e.currentTarget) statt globalem event

This commit is contained in:
vibe-bot 2025-08-09 21:27:02 +02:00
parent f50c354ab2
commit 9cedc3ce96

View file

@ -587,11 +587,11 @@ export default function App() {
/>
)}
<div className="sound-btn group rounded-xl flex items-center justify-between p-3 cursor-pointer"
onClick={async ()=>{
onClick={async (e)=>{
// Rainbow-Flash für 1s im Rainbow-Theme
try {
if (theme === 'rainbow') {
const el = (event?.currentTarget as HTMLDivElement | undefined);
const el = (e.currentTarget as HTMLDivElement | undefined);
if (el) {
el.classList.add('rainbow-flash');
setTimeout(()=> el.classList.remove('rainbow-flash'), 1000);