From 2df7f2d92478d188a80a30a614c91e121247700e Mon Sep 17 00:00:00 2001 From: Max Koon <22125083+k2on@users.noreply.github.com> Date: Mon, 24 Nov 2025 23:05:34 -0500 Subject: [PATCH] feat: refresh transactions on table --- packages/ui/src/transactions.tsx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/transactions.tsx b/packages/ui/src/transactions.tsx index a71f136..a958e49 100644 --- a/packages/ui/src/transactions.tsx +++ b/packages/ui/src/transactions.tsx @@ -1,6 +1,11 @@ import * as Table from "../components/Table"; -import { useQuery } from "@rocicorp/zero/react"; -import { queries, type Transaction } from "@money/shared"; +import { useQuery, useZero } from "@rocicorp/zero/react"; +import { + queries, + type Mutators, + type Schema, + type Transaction, +} from "@money/shared"; import { use } from "react"; import { View, Text } from "react-native"; import { RouterContext } from "."; @@ -29,8 +34,18 @@ export function Transactions() { const { auth } = use(RouterContext); const [items] = useQuery(queries.allTransactions(auth)); + const z = useZero(); + return ( - + { + if (key.name == "r" && key.shift) { + z.mutate.link.updateTransactions(); + } + }} + >