Skip to content

Commit

Permalink
show badge award events in timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
hzrd149 committed Oct 13, 2023
1 parent 56fc982 commit 07d5e77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/components/timeline-page/generic-note-timeline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { getEventUID, isReply } from "../../../helpers/nostr/events";
import ReplyNote from "./reply-note";
import RelayRecommendation from "./relay-recommendation";
import { ExtendedIntersectionObserverEntry, useIntersectionObserver } from "../../../providers/intersection-observer";
import BadgeAwardCard from "../../../views/badges/components/badge-award-card";

function RenderEvent({ event }: { event: NostrEvent }) {
let content: ReactNode | null = null;
Expand All @@ -35,6 +36,8 @@ function RenderEvent({ event }: { event: NostrEvent }) {
case Kind.RecommendRelay:
content = <RelayRecommendation event={event} />;
break;
case Kind.BadgeAward:
content = <BadgeAwardCard award={event} />;
default:
content = <Text>Unknown event kind: {event.kind}</Text>;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/views/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function HomePage() {
const { relays } = useRelaySelectionContext();
const { listId, filter } = usePeopleListContext();

const kinds = [Kind.Text, Kind.Repost, Kind.Article, Kind.RecommendRelay];
const kinds = [Kind.Text, Kind.Repost, Kind.Article, Kind.RecommendRelay, Kind.BadgeAward];
const query = useMemo<NostrRequestFilter>(() => {
if (filter === undefined) return { kinds };
return { ...filter, kinds };
Expand Down

0 comments on commit 07d5e77

Please sign in to comment.