diff --git a/src/element/goal.tsx b/src/element/goal.tsx index 84ef3ad..2f959be 100644 --- a/src/element/goal.tsx +++ b/src/element/goal.tsx @@ -42,7 +42,9 @@ export function Goal({ className="progress-indicator" style={{ transform: `translateX(-${100 - progress}%)` }} > - {formatSats(soFar)} + {!isFinished && ( + {formatSats(soFar)} + )} Goal: {formatSats(goalAmount)} diff --git a/src/element/new-goal.css b/src/element/new-goal.css index 56af65e..90d384b 100644 --- a/src/element/new-goal.css +++ b/src/element/new-goal.css @@ -1,16 +1,9 @@ -.add-stream { - display: flex; - align-items: center; - justify-content: center; - gap: 12px; -} - .new-goal .h3 { font-size: 24px; margin: 0; } -.zap-goals { +.new-goal .zap-goals { display: flex; align-items: center; gap: 8px; diff --git a/src/hooks/goals.ts b/src/hooks/goals.ts index b946902..1a85801 100644 --- a/src/hooks/goals.ts +++ b/src/hooks/goals.ts @@ -25,19 +25,3 @@ export function useGoal(link: NostrLink, leaveOpen = true) { return data?.at(0); } - -export function useGoalZaps(goal: NostrEvent) { - const a = findTag(goal, "a") ?? ""; - const sub = useMemo(() => { - const b = new RequestBuilder(`goal-zaps:${goal.id.slice(0, 12)}`); - b.withFilter() - .kinds([EventKind.ZapReceipt]) - .tag("e", [goal.id]) - .tag("p", [goal.pubkey]); // todo: ability to tag one or more p in goals? - return b; - }, [goal]); - - const { data } = useRequestBuilder(System, FlatNoteStore, sub); - - return data ?? []; -}