From 51ad9d6f8d185bce42ca55dbd5789c3f730f478b Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Mon, 2 May 2022 13:52:53 -0400 Subject: [PATCH] refactor charities query to remove parens --- web/lib/firebase/txns.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/web/lib/firebase/txns.ts b/web/lib/firebase/txns.ts index 177994e3..9f2b1f3b 100644 --- a/web/lib/firebase/txns.ts +++ b/web/lib/firebase/txns.ts @@ -22,9 +22,8 @@ export function listenForCharityTxns( return listenForValues(getCharityQuery(charityId), setTxns) } -const getCharitiesQuery = () => - query(txnCollection, where('toType', '==', 'CHARITY')) +const charitiesQuery = query(txnCollection, where('toType', '==', 'CHARITY')) export function listenForAllCharityTxns(setTxns: (txns: Txn[]) => void) { - return listenForValues(getCharitiesQuery(), setTxns) + return listenForValues(charitiesQuery, setTxns) }