From 5cf1157636ccd5d0cc47d4bec6ea7aaa4dc5bdae Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 7 May 2026 23:10:57 -0700 Subject: [PATCH] Rename fundraising goals to goals --- src/components/CommentContext.tsx | 2 +- src/components/CommunityDetailPage.tsx | 26 ++++++++++++------------ src/components/CreateGoalDialog.tsx | 10 ++++----- src/components/ExternalContentHeader.tsx | 2 +- src/components/NoteCard.tsx | 6 ------ src/pages/NotificationsPage.tsx | 2 +- src/pages/PostDetailPage.tsx | 2 +- 7 files changed, 22 insertions(+), 28 deletions(-) diff --git a/src/components/CommentContext.tsx b/src/components/CommentContext.tsx index bc6a07ea..adddc946 100644 --- a/src/components/CommentContext.tsx +++ b/src/components/CommentContext.tsx @@ -134,7 +134,7 @@ const KIND_LABELS: Record = { 34139: 'a playlist', 34236: 'a divine', 34550: 'a community', - 9041: 'a fundraising goal', + 9041: 'a goal', 35128: 'an nsite', 36639: 'an action', 36787: 'a track', diff --git a/src/components/CommunityDetailPage.tsx b/src/components/CommunityDetailPage.tsx index b91bdaa5..0769ca85 100644 --- a/src/components/CommunityDetailPage.tsx +++ b/src/components/CommunityDetailPage.tsx @@ -338,7 +338,7 @@ export function CommunityDetailPage({ event }: { event: NostrEvent }) { const { data: commentsData, isLoading: commentsLoading } = useComments(event, 500); const { membersOnly } = useMembersOnlyFilter(); - // ── Fundraising goals (NIP-75) ────────────────────────────────────────────── + // ── Goals (NIP-75) ────────────────────────────────────────────────────────── const { data: goals, isLoading: goalsLoading } = useCommunityGoals(communityATag || undefined); const { data: communityEvents, isLoading: eventsLoading } = useCommunityEvents(communityATag || undefined); const now = useNow(60_000); @@ -447,11 +447,11 @@ export function CommunityDetailPage({ event }: { event: NostrEvent }) { } }, [event, toast]); - // ── FAB — visible on comments, fundraising, and members tabs ────────────── + // ── FAB — visible on comments, goals, and members tabs ───────────────────── const handleFabClick = useCallback(() => { if (activeTab === 'comments') { setComposeOpen(true); - } else if (activeTab === 'fundraising') { + } else if (activeTab === 'goals') { setGoalDialogOpen(true); } else if (activeTab === 'events') { setEventDialogOpen(true); @@ -460,7 +460,7 @@ export function CommunityDetailPage({ event }: { event: NostrEvent }) { } }, [activeTab]); - const fabIcon = activeTab === 'fundraising' + const fabIcon = activeTab === 'goals' ? : activeTab === 'members' ? @@ -471,7 +471,7 @@ export function CommunityDetailPage({ event }: { event: NostrEvent }) { useLayoutOptions({ showFAB: activeTab === 'comments' - || activeTab === 'fundraising' + || activeTab === 'goals' || activeTab === 'events' || (activeTab === 'members' && canAddMembers), onFabClick: handleFabClick, @@ -586,14 +586,14 @@ export function CommunityDetailPage({ event }: { event: NostrEvent }) { className="flex-none min-w-fit rounded-none border-b-2 border-transparent data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:shadow-none px-4 pb-3 pt-2" > - Comments + Posts - Fundraising + Goals - {/* ── Fundraising tab ── */} - + {/* ── Goals tab ── */} + {goalsLoading ? (
{Array.from({ length: 2 }).map((_, i) => ( @@ -693,8 +693,8 @@ export function CommunityDetailPage({ event }: { event: NostrEvent }) { ) : activeGoals.length === 0 && pastGoals.length === 0 ? (
{membersOnly && (goals ?? []).length > 0 - ? 'No fundraising goals from community members yet. Toggle the shield icon to see all goals.' - : <>No fundraising goals yet.{user ? ' Create one to get started!' : ''}} + ? 'No goals from community members yet. Toggle the shield icon to see all goals.' + : <>No goals yet.{user ? ' Create one to get started!' : ''}}
) : (
@@ -776,7 +776,7 @@ export function CommunityDetailPage({ event }: { event: NostrEvent }) { onOpenChange={setComposeOpen} /> - {/* FAB-triggered goal creation dialog for the fundraising tab */} + {/* FAB-triggered goal creation dialog for the goals tab */} {communityATag && ( - Create Fundraising Goal + Create Goal
@@ -201,7 +201,7 @@ export function CreateGoalDialog({ communityATag, children, open: controlledOpen