refactor charities query to remove parens

This commit is contained in:
Sinclair Chen 2022-05-02 13:52:53 -04:00
parent dee260fc17
commit 51ad9d6f8d

View File

@ -22,9 +22,8 @@ export function listenForCharityTxns(
return listenForValues<Txn>(getCharityQuery(charityId), setTxns) return listenForValues<Txn>(getCharityQuery(charityId), setTxns)
} }
const getCharitiesQuery = () => const charitiesQuery = query(txnCollection, where('toType', '==', 'CHARITY'))
query(txnCollection, where('toType', '==', 'CHARITY'))
export function listenForAllCharityTxns(setTxns: (txns: Txn[]) => void) { export function listenForAllCharityTxns(setTxns: (txns: Txn[]) => void) {
return listenForValues<Txn>(getCharitiesQuery(), setTxns) return listenForValues<Txn>(charitiesQuery, setTxns)
} }