From 4a7c00b0d0d61341946786ffbde0b5cda31e2663 Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Wed, 4 Oct 2023 10:33:19 -0500 Subject: [PATCH] add error boundary to community home --- src/views/communities/components/community-card.tsx | 2 +- src/views/communities/index.tsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/communities/components/community-card.tsx b/src/views/communities/components/community-card.tsx index 9cba7d979..c9ed447a8 100644 --- a/src/views/communities/components/community-card.tsx +++ b/src/views/communities/components/community-card.tsx @@ -1,4 +1,5 @@ import { memo, useRef } from "react"; +import { nip19 } from "nostr-tools"; import { Link as RouterLink } from "react-router-dom"; import { Box, Card, CardProps, Center, Flex, Heading, LinkBox, LinkOverlay, Text } from "@chakra-ui/react"; @@ -9,7 +10,6 @@ import { useRegisterIntersectionEntity } from "../../../providers/intersection-o import { getEventUID } from "../../../helpers/nostr/events"; import { getCommunityImage, getCommunityName } from "../../../helpers/nostr/communities"; import CommunityDescription from "./community-description"; -import { nip19 } from "nostr-tools"; import CommunityModList from "./community-mod-list"; function CommunityCard({ community, ...props }: Omit & { community: NostrEvent }) { diff --git a/src/views/communities/index.tsx b/src/views/communities/index.tsx index 9db7f4a4b..6fa4fe937 100644 --- a/src/views/communities/index.tsx +++ b/src/views/communities/index.tsx @@ -15,6 +15,7 @@ import RelaySelectionProvider, { useRelaySelectionContext } from "../../provider import { COMMUNITY_DEFINITION_KIND, validateCommunity } from "../../helpers/nostr/communities"; import { NostrEvent } from "../../types/nostr-event"; import { NostrQuery } from "../../types/nostr-query"; +import { ErrorBoundary } from "../../components/error-boundary"; function CommunitiesHomePage() { const { filter, listId } = usePeopleListContext(); @@ -47,7 +48,9 @@ function CommunitiesHomePage() { {communities.map((event) => ( - + + + ))}