Skip to content

Commit b475a6d

Browse files
author
Mat Jones
committed
code cleanup per review
1 parent f915566 commit b475a6d

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@types/react": "16.9.26",
1212
"@types/react-dom": "16.9.6",
1313
"@types/react-router-dom": "5.1.5",
14-
"andculturecode-javascript-core": "0.2.3",
14+
"andculturecode-javascript-core": "0.3.3",
1515
"axios": "0.19.2",
1616
"i18next": "19.4.5",
1717
"immutable": "4.0.0-rc.12",

src/hooks/use-query.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ export function useQuery<TRecord, TQueryParams, TPathParams = undefined>(
1212
options: UseQueryOptions<TRecord, TQueryParams, TPathParams>
1313
) {
1414
const {
15-
service,
16-
initialQuery,
1715
initialPathParams,
18-
onSuccess,
16+
initialQuery,
1917
onError,
18+
onSuccess,
19+
serviceHook,
2020
} = options;
2121

22-
const { list: listApi } = service();
22+
const { list: listApi } = serviceHook();
2323

2424
const handleSuccess = useCallback(
2525
(records: Array<TRecord>) => {

src/interfaces/use-query-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface UseQueryOptions<
77
TQueryParams,
88
TPathParams = undefined
99
> {
10-
service:
10+
serviceHook:
1111
| ListServiceHook<TRecord, TQueryParams>
1212
| NestedListServiceHook<TRecord, TPathParams, TQueryParams>;
1313
initialQuery: TQueryParams;

0 commit comments

Comments
 (0)