We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c694ad commit 1c254d0Copy full SHA for 1c254d0
islands/Hiccups.tsx
@@ -2,15 +2,18 @@ const kv = await Deno.openKv();
2
//kv.set(["hiccups", "alltime"], "1");
3
const hiccups = await kv.get(["hiccups", "alltime"]);
4
export default function Hiccup() {
5
-
+ let globalhic = "";
6
+ if (hiccups != undefined) {
7
+ globalhic = "<p>Global Hiccup counter: " + hiccups.value + "</p>";
8
+ }
9
console.log(hiccups)
10
return (
11
<div class="flex flex-col items-center">
12
<p>26</p>
13
<div dangerouslySetInnerHTML={{ __html: `
14
<button onclick="playAudio()" type="button">Click here to Hiccup</button>`
15
}} />
- <p>Global Hiccup counter: {hiccups.value}</p>
16
+ {globalhic}
17
</div>
18
)
19
}
0 commit comments