refactor: better shortcut hook
This commit is contained in:
@@ -60,4 +60,20 @@ export const queries = {
|
||||
.orderBy("createdAt", "desc");
|
||||
},
|
||||
),
|
||||
getBudgets: syncedQueryWithContext(
|
||||
"getBudgets",
|
||||
z.tuple([]),
|
||||
(authData: AuthData | null) => {
|
||||
isLoggedIn(authData);
|
||||
return builder.budget.limit(10);
|
||||
},
|
||||
),
|
||||
getBudgetCategories: syncedQueryWithContext(
|
||||
"getBudgetCategories",
|
||||
z.tuple([]),
|
||||
(authData: AuthData | null) => {
|
||||
isLoggedIn(authData);
|
||||
return builder.category.orderBy("order", "desc");
|
||||
},
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user