From 985fa2f7c99832cdf3c3351d2273c8fd05402b78 Mon Sep 17 00:00:00 2001 From: polwex Date: Wed, 17 Sep 2025 21:45:18 +0700 Subject: basic comms working --- front/src/components/post/wrappers/Nostr.tsx | 2 +- front/src/components/post/wrappers/NostrIcon.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'front/src/components/post/wrappers') diff --git a/front/src/components/post/wrappers/Nostr.tsx b/front/src/components/post/wrappers/Nostr.tsx index bdc5ba9..2782fb8 100644 --- a/front/src/components/post/wrappers/Nostr.tsx +++ b/front/src/components/post/wrappers/Nostr.tsx @@ -4,7 +4,7 @@ import useLocalState from "@/state/state"; export default NostrPost; function NostrPost({ data }: { data: NostrPost }) { - const { profiles } = useLocalState(); + const { profiles } = useLocalState((s) => ({ profiles: s.profiles })); const profile = profiles.get(data.event.pubkey); return ; 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 (
- +
); } -- cgit v1.2.3