Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Sep 9, 2024
1 parent ac44969 commit a03205c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/TablePagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "react"

import { type Pagination, usePagination } from "../hooks/api"
import { type ListArg, type ListResult, handleQueryState } from "../utils/api"
import { type ListArg, type ListResult, handleResultState } from "../utils/api"

export type TablePaginationProps<
QueryArg extends ListArg,
Expand Down Expand Up @@ -91,7 +91,7 @@ const TablePagination = <

return (
<Stack {...stackProps}>
{handleQueryState(result, ({ data }) =>
{handleResultState(result, ({ data }) =>
children(data, {
limit,
page,
Expand Down
5 changes: 2 additions & 3 deletions src/hooks/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export function useParams<
export function useParamsRequired<
OnErrorRT extends TryValidateSyncOnErrorRT<ObjectSchemaFromShape<Shape>>,
Shape extends ObjectShape = {},
State extends Record<string, any> = Record<string, any>,
>({
shape,
children,
Expand All @@ -139,7 +138,7 @@ export function useParamsRequired<
TryValidateSyncRT<ObjectSchemaFromShape<Shape>, OnErrorRT>
>,
) => ReactNode
onValidationError: (navigate: Navigate<State>) => void
onValidationError: (navigate: Navigate) => void
onValidationSuccess?: (
params: NonNullable<
TryValidateSyncRT<ObjectSchemaFromShape<Shape>, OnErrorRT>
Expand All @@ -151,7 +150,7 @@ export function useParamsRequired<
>
}) {
const params = useParams(shape, validateOptions)
const navigate = useNavigate<State>()
const navigate = useNavigate()

useEffect(
() => {
Expand Down

0 comments on commit a03205c

Please sign in to comment.