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:
+4
-3
@@ -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();
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user