add dice sounds to all rollers

This commit is contained in:
RussellChamp committed 2021-08-18 22:37:42 -04:00
1 parent fe1074e863
commit d9a976c5f1
12 files changed
+66 -21

No files matched your search

+4 -1
View File
@@ -1,16 +1,19 @@
<script lang="ts">
import { Button } from "sveltestrap";
import { format as formatDate } from "date-fns";
import { createEventDispatcher } from "svelte";
import DungeonCard from "./DungeonCard.svelte";
import { Dungeon, rollDungeon } from "../rollers/dungeons";
const dispatch = createEventDispatcher();
export let rollResults: { dungeon: Dungeon; timestamp: string }[] = [];
function roll(event: Event) {
let dungeon = rollDungeon();
rollResults = [{ dungeon, timestamp: formatDate(new Date(), "P kk:mm:ss") }, ...rollResults];
dispatch("roll");
}
</script>