Skip to content

Commit

Permalink
feat: add emojisplosion to wins
Browse files Browse the repository at this point in the history
number of emoji is relative to results (less guess = more emoji)
  • Loading branch information
mikesprague committed Oct 16, 2023
1 parent 1e75bc3 commit 5dd5b7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/helpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { emojisplosion, emojisplosions } from 'emojisplosion';
import Swal from 'sweetalert2/dist/sweetalert2.js';
import { registerSW } from 'virtual:pwa-register';

Expand Down Expand Up @@ -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: `<strong>${successStrings[currentRow]}</strong>`,
Expand All @@ -355,6 +359,7 @@ export const checkWord = () => {
didDestroy: () => {
showStats();
releaseWakeState();
cancel();
},
});
}, 1500);
Expand Down

0 comments on commit 5dd5b7f

Please sign in to comment.