Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TsukemonoGit committed Jun 6, 2024
1 parent 6622666 commit fdf7c6d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Nostr Army Knife webExtension

- conversion between nostr hexid and NIP-19 (bech32-encoded entities)

- link to njump me

[Chrome Web Store](https://chromewebstore.google.com/detail/nake/pckmdjknadbfalfohabbccmffoohlamk)

[Firefox Addon Store](https://addons.mozilla.org/ja/firefox/addon/nake/)
Expand Down
14 changes: 12 additions & 2 deletions entrypoints/components/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Accessor, Show, createSignal } from "solid-js";
import { Accessor, Show, createMemo, createSignal } from "solid-js";
import Button from "./Button";
import { className } from "@/util";
import Link from "./Link";
Expand Down Expand Up @@ -70,6 +70,16 @@ export default function CopyButton({
}, 2000);
});
};
const href = createMemo(() => {
if (text) {
if (typeof text === "string") {
return text;
} else {
return text();
}
}
});

return (
<div class={className} style={style}>
<span
Expand Down Expand Up @@ -97,7 +107,7 @@ export default function CopyButton({
<Show when={link === true}>
<Link
title={"open in njump"}
href={`https://njump.me/${typeof text === "string" ? text : text()}`}
href={`https://njump.me/${href}`}
class={className + " nakeLinkButton"}
style={{
height: "fit-content",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nake",
"description": "Nostr Army Knife webExtension",
"private": true,
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"scripts": {
"dev": "wxt",
Expand Down

0 comments on commit fdf7c6d

Please sign in to comment.