forked from Kieran/zap.stream
refactor: remove unused hook
This commit is contained in:
parent
a57cc7f85b
commit
7dce7f5a73
@ -42,7 +42,9 @@ export function Goal({
|
||||
className="progress-indicator"
|
||||
style={{ transform: `translateX(-${100 - progress}%)` }}
|
||||
>
|
||||
<span className="amount so-far">{formatSats(soFar)}</span>
|
||||
{!isFinished && (
|
||||
<span className="amount so-far">{formatSats(soFar)}</span>
|
||||
)}
|
||||
</Progress.Indicator>
|
||||
<span className="amount target">Goal: {formatSats(goalAmount)}</span>
|
||||
</Progress.Root>
|
||||
|
@ -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;
|
||||
|
@ -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<FlatNoteStore>(System, FlatNoteStore, sub);
|
||||
|
||||
return data ?? [];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user