Skip to content

Commit

Permalink
fix: imports for starfx/react
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Sep 10, 2023
1 parent f2722e4 commit 3a918f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions query/react.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LoadingState, QueryState } from "../types.ts";
import type { LoaderState, QueryState } from "../types.ts";
import { React, useDispatch, useSelector } from "../deps.ts";
const { useState, useEffect } = React;

Expand All @@ -13,16 +13,16 @@ interface SagaAction<P = any> {
payload: { key: string; options: P };
}

export interface UseApiProps<P = any> extends LoadingState {
export interface UseApiProps<P = any> extends LoaderState {
trigger: (p: P) => void;
action: ActionFn<P>;
}
export interface UseApiSimpleProps extends LoadingState {
export interface UseApiSimpleProps extends LoaderState {
trigger: () => void;
action: ActionFn;
}
export interface UseApiAction<A extends SagaAction = SagaAction>
extends LoadingState {
extends LoaderState {
trigger: () => void;
action: A;
}
Expand Down Expand Up @@ -201,7 +201,7 @@ export function useCache<D = any, A extends SagaAction = SagaAction>(
* ```
*/
export function useLoaderSuccess(
cur: Pick<LoadingState, "isLoading" | "isSuccess">,
cur: Pick<LoaderState, "isLoading" | "isSuccess">,
success: () => any,
) {
const [prev, setPrev] = useState(cur);
Expand Down

0 comments on commit 3a918f0

Please sign in to comment.