I have a onclick function onClaim that gets the txnId and now I want to use that txnId to query from Transactions table. but Iβm having error in .first()
const onClaim = (txnId: any) => {
const query = useMoralisQuery(
"Transactions",
(query) =>
query
.equalTo("_id", txnId),
[],
);
const txnClaim = query.first()
txnClaim.set("x",1337);
txnClaim.save()
}