diff options
Diffstat (limited to 'src/frontend/components')
| -rw-r--r-- | src/frontend/components/MastodonShareButton.tsx | 4 | ||||
| -rw-r--r-- | src/frontend/components/NoFunAllowed.tsx | 16 |
2 files changed, 12 insertions, 8 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; } |
