Skip to content

Commit

Permalink
♻️ refactor: remove unused onClick and create a separate pagination t…
Browse files Browse the repository at this point in the history
…ype.
  • Loading branch information
gabrielcastr0 committed Dec 16, 2024
1 parent 4b0a866 commit b0974cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/(routes)/ledgers/ledgers-data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const LedgerRow: React.FC<LedgerRowProps> = ({
className="h-auto w-max p-2"
data-testid="actions"
>
<MoreVertical size={16} onClick={() => {}} />
<MoreVertical size={16} />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
Expand Down
3 changes: 2 additions & 1 deletion src/client/ledgers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
patchFetcher,
postFetcher
} from '@/lib/fetcher'
import { PaginationRequest } from '@/types/pagination-request-type'
import {
useMutation,
UseMutationOptions,
Expand Down Expand Up @@ -51,7 +52,7 @@ const useListLedgers = ({
enabled = true,
limit = 10,
page = 1
}: UseListLedgersProps & { limit?: number; page?: number }) => {
}: UseListLedgersProps & PaginationRequest) => {
return useQuery<PaginationDto<LedgerResponseDto>>({
queryKey: ['ledgers', organizationId, { limit, page }],
queryFn: getFetcher(
Expand Down
4 changes: 4 additions & 0 deletions src/types/pagination-request-type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export type PaginationRequest = {
limit?: number
page?: number
}

0 comments on commit b0974cf

Please sign in to comment.