chore: use toggle order

This commit is contained in:
Scott Wilson
2024-11-26 17:26:49 -08:00
parent 4f4b5be8ea
commit cf5f49d14e
2 changed files with 16 additions and 8 deletions
+5 -1
View File
@@ -33,6 +33,10 @@ export const usePagination = <T extends string>(
search,
setSearch,
orderBy,
setOrderBy
setOrderBy,
toggleOrderDirection: () =>
setOrderDirection((prev) =>
prev === OrderByDirection.DESC ? OrderByDirection.ASC : OrderByDirection.DESC
)
};
};