refactor: remove unused hook
This commit is contained in:
@ -42,7 +42,9 @@ export function Goal({
|
|||||||
className="progress-indicator"
|
className="progress-indicator"
|
||||||
style={{ transform: `translateX(-${100 - progress}%)` }}
|
style={{ transform: `translateX(-${100 - progress}%)` }}
|
||||||
>
|
>
|
||||||
<span className="amount so-far">{formatSats(soFar)}</span>
|
{!isFinished && (
|
||||||
|
<span className="amount so-far">{formatSats(soFar)}</span>
|
||||||
|
)}
|
||||||
</Progress.Indicator>
|
</Progress.Indicator>
|
||||||
<span className="amount target">Goal: {formatSats(goalAmount)}</span>
|
<span className="amount target">Goal: {formatSats(goalAmount)}</span>
|
||||||
</Progress.Root>
|
</Progress.Root>
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
.add-stream {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-goal .h3 {
|
.new-goal .h3 {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zap-goals {
|
.new-goal .zap-goals {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
@ -25,19 +25,3 @@ export function useGoal(link: NostrLink, leaveOpen = true) {
|
|||||||
|
|
||||||
return data?.at(0);
|
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 ?? [];
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user