refactor: standardize code formatting and improve consistency across various components and API routes for enhanced readability and maintainability
This commit is contained in:
@@ -83,7 +83,7 @@ export function useLocalStorage<T>(key: string, initialValue: T) {
|
||||
|
||||
// Helper function to serialize transaction params into a query key
|
||||
export function getTransactionsQueryKey(
|
||||
params: TransactionsPaginatedParams = {}
|
||||
params: TransactionsPaginatedParams = {},
|
||||
): (string | number)[] {
|
||||
const key: (string | number)[] = ["transactions"];
|
||||
if (params.limit) key.push(`limit:${params.limit}`);
|
||||
@@ -106,7 +106,7 @@ export function getTransactionsQueryKey(
|
||||
|
||||
export function useTransactions(
|
||||
params: TransactionsPaginatedParams = {},
|
||||
enabled = true
|
||||
enabled = true,
|
||||
) {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -134,7 +134,7 @@ export function useTransactions(
|
||||
if (params.isReconciled !== undefined && params.isReconciled !== "all") {
|
||||
searchParams.set(
|
||||
"isReconciled",
|
||||
params.isReconciled === true ? "true" : "false"
|
||||
params.isReconciled === true ? "true" : "false",
|
||||
);
|
||||
}
|
||||
if (params.sortField) searchParams.set("sortField", params.sortField);
|
||||
|
||||
Reference in New Issue
Block a user