diff --git a/src/lib/helpers.js b/src/lib/helpers.js index 89551672..da4f8da2 100644 --- a/src/lib/helpers.js +++ b/src/lib/helpers.js @@ -1,3 +1,4 @@ +import { emojisplosion, emojisplosions } from 'emojisplosion'; import Swal from 'sweetalert2/dist/sweetalert2.js'; import { registerSW } from 'virtual:pwa-register'; @@ -341,6 +342,9 @@ export const checkWord = () => { colorGuess(currentRow); if (guess.toLowerCase() === birdle.word) { + const { cancel } = emojisplosions({ + emojiCount: 50 / (currentRow + 1), + }); setTimeout(() => { Swal.fire({ html: `${successStrings[currentRow]}`, @@ -355,6 +359,7 @@ export const checkWord = () => { didDestroy: () => { showStats(); releaseWakeState(); + cancel(); }, }); }, 1500);