diff options
Diffstat (limited to 'front/src/components/post/wrappers/NostrIcon.tsx')
-rw-r--r-- | front/src/components/post/wrappers/NostrIcon.tsx | 9 |
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> ); } |