refactor: replace global audio instance with inline audio creation in snackbar
All checks were successful
Code quality checks / biome (push) Successful in 11s

This commit is contained in:
Seth 2025-05-19 21:04:10 -04:00
parent 7289a541f8
commit 8d76c55539

View file

@ -89,16 +89,13 @@ interface Options {
onClosed?: (snackbar: Snackbar) => void;
}
const popcorn = new Audio("https://no.ipv4.army/raw/Popcorn.ogg");
export const snacker = (opts: Options) => {
snackbar({
closeable: true,
messageLine: 2,
queue: "snacker",
onOpen: () => {
popcorn.currentTime = 0;
popcorn.play();
new Audio("https://no.ipv4.army/raw/Popcorn.ogg").play();
},
...opts,