fix(payment): crash on open due to amount.toFixed on numeric string

feat(shared): tag filter on shared transactions list
This commit is contained in:
2026-03-14 21:27:08 +11:00
parent 084b8764e3
commit 02ac136e19
5 changed files with 81 additions and 18 deletions
+4 -3
View File
@@ -208,11 +208,12 @@ export function useParticipantBalances() {
});
}
export function useSharedTransactions() {
export function useSharedTransactions(tagIds?: string[]) {
return useQuery({
queryKey: ["shared-transactions"],
queryKey: ["shared-transactions", tagIds],
queryFn: async () => {
const res = await fetch("/api/shared-transactions");
const params = tagIds?.length ? `?tag_ids=${tagIds.join(",")}` : "";
const res = await fetch(`/api/shared-transactions${params}`);
return res.json();
},
});