refactor: enforce semantic values and numeric lint rules
This commit is contained in:
@@ -30,6 +30,8 @@ type CreateExpenseCategory =
|
||||
type UpdateExpenseCategory =
|
||||
paths["/api/v1/bank-cards/categories/{id}"]["patch"]["requestBody"]["content"]["application/json"];
|
||||
|
||||
const OPERATIONS_PAGE_SIZE = 100;
|
||||
|
||||
function useBankCards(includeArchived = false) {
|
||||
return useAuthenticatedQuery(
|
||||
apiQueryClient.queryOptions("get", "/api/v1/bank-cards", {
|
||||
@@ -71,7 +73,7 @@ function useBankOperations(
|
||||
query: {
|
||||
...query,
|
||||
page: all ? 1 : query.page,
|
||||
limit: query.limit === "all" ? 100 : query.limit,
|
||||
limit: query.limit === "all" ? OPERATIONS_PAGE_SIZE : query.limit,
|
||||
},
|
||||
};
|
||||
const options = apiQueryClient.queryOptions(
|
||||
@@ -87,7 +89,7 @@ function useBankOperations(
|
||||
) => {
|
||||
const previous = previousQuery?.queryKey[2]?.params;
|
||||
return !all &&
|
||||
previousQuery?.queryKey.length === 3 &&
|
||||
previousQuery?.queryKey.length === options.queryKey.length &&
|
||||
previous?.path?.id === id &&
|
||||
previous?.query?.month === query.month &&
|
||||
previous?.query?.from === query.from &&
|
||||
|
||||
Reference in New Issue
Block a user