- commit
- 3a918f0
- parent
- f2722e4
- author
- Eric Bower
- date
- 2023-09-10 03:18:41 +0000 UTC
fix: imports for `starfx/react`
1 files changed,
+5,
-5
+5,
-5
1@@ -1,4 +1,4 @@
2-import type { LoadingState, QueryState } from "../types.ts";
3+import type { LoaderState, QueryState } from "../types.ts";
4 import { React, useDispatch, useSelector } from "../deps.ts";
5 const { useState, useEffect } = React;
6
7@@ -13,16 +13,16 @@ interface SagaAction<P = any> {
8 payload: { key: string; options: P };
9 }
10
11-export interface UseApiProps<P = any> extends LoadingState {
12+export interface UseApiProps<P = any> extends LoaderState {
13 trigger: (p: P) => void;
14 action: ActionFn<P>;
15 }
16-export interface UseApiSimpleProps extends LoadingState {
17+export interface UseApiSimpleProps extends LoaderState {
18 trigger: () => void;
19 action: ActionFn;
20 }
21 export interface UseApiAction<A extends SagaAction = SagaAction>
22- extends LoadingState {
23+ extends LoaderState {
24 trigger: () => void;
25 action: A;
26 }
27@@ -201,7 +201,7 @@ export function useCache<D = any, A extends SagaAction = SagaAction>(
28 * ```
29 */
30 export function useLoaderSuccess(
31- cur: Pick<LoadingState, "isLoading" | "isSuccess">,
32+ cur: Pick<LoaderState, "isLoading" | "isSuccess">,
33 success: () => any,
34 ) {
35 const [prev, setPrev] = useState(cur);