diff --git a/src/components/Pacs/PacsApp.tsx b/src/components/Pacs/PacsApp.tsx index fb1f2c15d..8372e3fea 100644 --- a/src/components/Pacs/PacsApp.tsx +++ b/src/components/Pacs/PacsApp.tsx @@ -4,15 +4,15 @@ * manages effects and state. */ -import { PageSection } from "@patternfly/react-core"; -import config from "config"; -import { useEffect, useState } from "react"; import { genUUID, getState, type ThunkModuleToFunc, useThunk, -} from "react-reducer-utils"; +} from "@chhsiao1981/use-thunk"; +import { PageSection } from "@patternfly/react-core"; +import config from "config"; +import { useEffect, useState } from "react"; import { useLocation, useSearchParams } from "react-router-dom"; import { sanitizeAPIRootURL } from "../../api/api.ts"; import type { Lonk, LonkMessageData } from "../../api/lonk/types.ts"; diff --git a/src/components/Pacs/PacsView.tsx b/src/components/Pacs/PacsView.tsx index e3bc8f143..4685b0931 100644 --- a/src/components/Pacs/PacsView.tsx +++ b/src/components/Pacs/PacsView.tsx @@ -1,6 +1,9 @@ +import type { + DispatchFuncMap, + ThunkModuleToFunc, +} from "@chhsiao1981/use-thunk"; import { Empty, Flex, Spin, Typography } from "antd"; import type { CSSProperties } from "react"; -import type { DispatchFuncMap, ModuleToFunc } from "react-reducer-utils"; import type { PACSqueryCore } from "../../api/pfdcm"; import type * as DoPacs from "../../reducers/pacs"; import PacsInput, { @@ -11,7 +14,7 @@ import PacsStudiesView, { } from "./components/PacsStudiesView.tsx"; import type { PacsState } from "./types.ts"; -type TDoPacs = ModuleToFunc; +type TDoPacs = ThunkModuleToFunc; type Props = Pick & Pick & { diff --git a/src/reducers/pacs.ts b/src/reducers/pacs.ts index 9c381c221..0f84f94b0 100644 --- a/src/reducers/pacs.ts +++ b/src/reducers/pacs.ts @@ -1,5 +1,3 @@ -import config from "config"; -import type { ReadonlyNonEmptyArray } from "fp-ts/lib/ReadonlyNonEmptyArray"; import { init as _init, type ClassState, @@ -8,7 +6,9 @@ import { type State as rState, setData, type Thunk, -} from "react-reducer-utils"; +} from "@chhsiao1981/use-thunk"; +import config from "config"; +import type { ReadonlyNonEmptyArray } from "fp-ts/lib/ReadonlyNonEmptyArray"; import type { Location } from "react-router"; import { STATUS_OK, STATUS_OK_CREATE } from "../api/constants"; import type { SeriesKey } from "../api/lonk"; diff --git a/src/routes.tsx b/src/routes.tsx index 0872e54ec..98f5836a9 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,5 +1,4 @@ import { useEffect, useState } from "react"; -import type { ModuleToFunc } from "react-reducer-utils"; import { matchPath, useLocation, @@ -26,12 +25,9 @@ import { } from "./components/Routing/RouterContext"; import Signup from "./components/Signup"; import SinglePlugin from "./components/SinglePlugin"; -import type * as DoPacs from "./reducers/pacs"; import { useAppDispatch, useAppSelector } from "./store/hooks"; import { setSidebarActive } from "./store/ui/uiSlice"; -type TDoPacs = ModuleToFunc; - interface IState { selectData?: Series; }