Skip to content

Commit

Permalink
fix njump link
Browse files Browse the repository at this point in the history
  • Loading branch information
TsukemonoGit committed Jun 6, 2024
1 parent af0861c commit f5b10ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions entrypoints/components/CopyButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ export default function CopyButton({
}, 2000);
});
};
const href = createMemo(() => {
const href = createMemo((): string => {
if (text) {
if (typeof text === "string") {
return text;
} else {
return text();
}
} else {
return "";
}
});

Expand Down Expand Up @@ -104,10 +106,10 @@ export default function CopyButton({
<>{copiedIcon}</>
</Show>
</Button>
<Show when={link === true}>
<Show when={link === true && text}>
<Link
title={"open in njump"}
href={`https://njump.me/${href}`}
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.8",
"version": "0.1.9",
"type": "module",
"scripts": {
"dev": "wxt",
Expand Down

0 comments on commit f5b10ca

Please sign in to comment.