diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/frontend/components/MastodonShareButton.tsx | 4 | ||||
| -rw-r--r-- | src/frontend/components/NoFunAllowed.tsx | 16 | ||||
| -rw-r--r-- | src/frontend/import_map.json | 2 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/frontend/components/MastodonShareButton.tsx b/src/frontend/components/MastodonShareButton.tsx index 71395b3..2de0173 100644 --- a/src/frontend/components/MastodonShareButton.tsx +++ b/src/frontend/components/MastodonShareButton.tsx @@ -51,7 +51,7 @@ ${series ? "#" + series + " " : ""}${ {tootBox} <br /> <button - onClick={(() => { + onclick={() => { let instanceURL = instanceBox.value; if (!instanceURL.startsWith("https://")) { @@ -66,7 +66,7 @@ ${series ? "#" + series + " " : ""}${ }); console.log({ text, mastodonURL }); window.open(mastodonURL, "_blank"); - })()} + }} > Share </button> diff --git a/src/frontend/components/NoFunAllowed.tsx b/src/frontend/components/NoFunAllowed.tsx index abe323b..9f5c5f5 100644 --- a/src/frontend/components/NoFunAllowed.tsx +++ b/src/frontend/components/NoFunAllowed.tsx @@ -3,16 +3,20 @@ import { c } from "xeact"; +const onclick = () => { + Array.from(c("xeblog-slides-fluff")).forEach((el) => + el.classList.toggle("hidden") + ); +}; + export default function NoFunAllowed() { - return ( + const button = ( <button - onclick={(() => { - Array.from(c("xeblog-slides-fluff")).forEach((el) => - el.classList.toggle("hidden") - ); - })()} + class="" + onclick={() => onclick()} > No fun allowed </button> ); + return button; } diff --git a/src/frontend/import_map.json b/src/frontend/import_map.json index c5c1e27..ece602c 100644 --- a/src/frontend/import_map.json +++ b/src/frontend/import_map.json @@ -7,7 +7,7 @@ "@esbuild": "https://deno.land/x/esbuild@v0.17.13/mod.js", "@esbuild/deno": "https://deno.land/x/esbuild_deno_loader@0.6.0/mod.ts", - + "xeact": "https://xena.greedo.xeserv.us/pkg/xeact/v0.69.71/xeact.ts", "xeact/jsx-runtime": "https://xena.greedo.xeserv.us/pkg/xeact/v0.69.71/jsx-runtime.js", "@/": "./", |
