From 3aa71ab064c2a128fe563641f5e3a09189cea171 Mon Sep 17 00:00:00 2001
From: Ren Amamiya <123083837+reyamir@users.noreply.github.com>
Date: Tue, 25 Apr 2023 10:39:08 +0700
Subject: [PATCH] respect channel pubkey for kind 40, 41
---
src/components/channels/channelListItem.tsx | 11 +++++----
src/components/channels/channelProfile.tsx | 4 ++--
src/pages/channel/index.page.tsx | 3 ++-
src/utils/hooks/useChannelMetadata.tsx | 25 ++++++++++++---------
4 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/src/components/channels/channelListItem.tsx b/src/components/channels/channelListItem.tsx
index e7699c1a..4d5b9808 100644
--- a/src/components/channels/channelListItem.tsx
+++ b/src/components/channels/channelListItem.tsx
@@ -1,12 +1,11 @@
-import { DEFAULT_AVATAR } from '@stores/constants';
-
import { useChannelMetadata } from '@utils/hooks/useChannelMetadata';
import { usePageContext } from '@utils/hooks/usePageContext';
+import Skeleton from 'react-loading-skeleton';
import { twMerge } from 'tailwind-merge';
export const ChannelListItem = ({ data }: { data: any }) => {
- const channel: any = useChannelMetadata(data.event_id);
+ const channel: any = useChannelMetadata(data.event_id, data.pubkey);
const pageContext = usePageContext();
const searchParams: any = pageContext.urlParsed.search;
@@ -14,17 +13,17 @@ export const ChannelListItem = ({ data }: { data: any }) => {
return (
+
} alt={data.event_id} className="h-5 w-5 rounded object-contain" />
{channel?.name}
+ {channel?.name ||