aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-04-01 19:08:09 -0400
committerXe Iaso <me@xeiaso.net>2023-04-01 19:08:09 -0400
commite17d8c7c4e9cb737aac3db6e1c772e2a3da89962 (patch)
tree6a7922bb495380ab4a1ca95a949f8efb6752a43d /src
parentec368169fb4c7782834c626d77f6afab7924cd05 (diff)
downloadxesite-e17d8c7c4e9cb737aac3db6e1c772e2a3da89962.tar.xz
xesite-e17d8c7c4e9cb737aac3db6e1c772e2a3da89962.zip
fix
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'src')
-rw-r--r--src/frontend/components/MastodonShareButton.tsx4
-rw-r--r--src/frontend/components/NoFunAllowed.tsx16
-rw-r--r--src/frontend/import_map.json2
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",
"@/": "./",