summaryrefslogtreecommitdiff
path: root/front/src/components/post/wrappers/NostrIcon.tsx
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-09-17 21:45:18 +0700
committerpolwex <polwex@sortug.com>2025-09-17 21:45:18 +0700
commit985fa2f7c99832cdf3c3351d2273c8fd05402b78 (patch)
treebc727486a89ad05e588754f8de8b1096400a3d31 /front/src/components/post/wrappers/NostrIcon.tsx
parentf0df4c7297a05bd592d8717b8997284c80fd0500 (diff)
basic comms working
Diffstat (limited to 'front/src/components/post/wrappers/NostrIcon.tsx')
-rw-r--r--front/src/components/post/wrappers/NostrIcon.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/front/src/components/post/wrappers/NostrIcon.tsx b/front/src/components/post/wrappers/NostrIcon.tsx
index 0c368fb..30fbfe9 100644
--- a/front/src/components/post/wrappers/NostrIcon.tsx
+++ b/front/src/components/post/wrappers/NostrIcon.tsx
@@ -1,9 +1,12 @@
-import nostrIcon from "@/assets/icons/nostr.svg";
+import Icon from "@/components/Icon";
import useLocalState from "@/state/state";
import toast from "react-hot-toast";
import type { Poast } from "@/types/trill";
export default function ({ poast }: { poast: Poast }) {
- const { relays, api, keys } = useLocalState();
+ const { relays, api } = useLocalState((s) => ({
+ relays: s.relays,
+ api: s.api,
+ }));
async function sendToRelay(e: React.MouseEvent) {
e.stopPropagation();
@@ -16,7 +19,7 @@ export default function ({ poast }: { poast: Poast }) {
return (
<div className="icon" role="link" onMouseUp={sendToRelay}>
- <img role="link" src={nostrIcon} title="repost" />
+ <Icon name="nostr" size={20} title="relay to nostr" />
</div>
);
}