Skip to content

Commit

Permalink
used note for success alert in copy to clipboard action
Browse files Browse the repository at this point in the history
  • Loading branch information
szy-kenn committed Sep 17, 2024
1 parent b2d5f00 commit 44109c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/bundle.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function showStats(show: boolean = true, userData: UserData) {
* @param {GameState} gameState - the current game state (should be completed)
* @returns {void} - it will just copy to clipboard
*/
export function copyToClipboard(gameState: GameState) {
export async function copyToClipboard(gameState: GameState) {
const blue: string = "🟦";
const orange: string = "🟧";
const gray: string = "⬛";
Expand Down Expand Up @@ -462,7 +462,8 @@ export function copyToClipboard(gameState: GameState) {
}

navigator.clipboard.writeText(evaluations.join("\n"));
alert("Copied to Clipboard!");
// alert("Copied to Clipboard!");
await displayNote("Copied to clipboard!", 0, 1500, "system");
}


Expand Down

0 comments on commit 44109c8

Please sign in to comment.