Skip to content

Commit 1c254d0

Browse files
committed
test
1 parent 5c694ad commit 1c254d0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

islands/Hiccups.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ const kv = await Deno.openKv();
22
//kv.set(["hiccups", "alltime"], "1");
33
const hiccups = await kv.get(["hiccups", "alltime"]);
44
export default function Hiccup() {
5-
5+
let globalhic = "";
6+
if (hiccups != undefined) {
7+
globalhic = "<p>Global Hiccup counter: " + hiccups.value + "</p>";
8+
}
69
console.log(hiccups)
710
return (
811
<div class="flex flex-col items-center">
912
<p>26</p>
1013
<div dangerouslySetInnerHTML={{ __html: `
1114
<button onclick="playAudio()" type="button">Click here to Hiccup</button>`
1215
}} />
13-
<p>Global Hiccup counter: {hiccups.value}</p>
16+
{globalhic}
1417
</div>
1518
)
1619
}

0 commit comments

Comments
 (0)