mirror of
https://github.com/RussellChamp/tpw-roller.git
synced 2026-10-28 08:32:34 +00:00
Fix issue with details roller
This commit is contained in:
1 parent
ec4617e036
commit
e96028b65c
3 files changed
+25
-8
No files matched your search
@@ -24,13 +24,10 @@
|
||||
rollVisibility,
|
||||
} from "./details";
|
||||
|
||||
let rollResults: { category: string; value: string; timestamp: string }[] = [];
|
||||
let rollResults: { type: string; value: string; timestamp: string }[] = [];
|
||||
|
||||
function addResult(item: { roll: number; description: string }) {
|
||||
rollResults = [
|
||||
{ category: item.constructor.name, value: item.description, timestamp: formatDate(new Date(), "P kk:mm:ss") },
|
||||
...rollResults,
|
||||
];
|
||||
function addResult(item: { type: string; description: string; roll: number }) {
|
||||
rollResults = [{ type: item.type, value: item.description, timestamp: formatDate(new Date(), "P kk:mm:ss") }, ...rollResults];
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -94,7 +91,7 @@
|
||||
</span>
|
||||
|
||||
{#each rollResults as result}
|
||||
<h4>{result.timestamp}: ({result.category}): {result.value}</h4>
|
||||
<h4>{result.timestamp}: ({result.type}): {result.value}</h4>
|
||||
{/each}
|
||||
</main>
|
||||
|
||||
|
||||
Reference in new issue
Block a user