Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"react-dropzone": "^14.2.3",
"react-error-boundary": "^4.0.13",
"react-force-graph-2d": "^1.25.5",
"react-reducer-utils": "^7.1.0",
"react-reducer-utils": "^8.0.0",
"react-redux": "^9.1.2",
"react-resizable-panels": "^2.1.4",
"react-responsive": "^10.0.0",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions src/components/Pacs/PacsApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import { useEffect, useState } from "react";
import {
genUUID,
getState,
type ModuleToFunc,
StateType,
useReducer,
type ThunkModuleToFunc,
useThunk,
} from "react-reducer-utils";
import { useLocation, useSearchParams } from "react-router-dom";
import { sanitizeAPIRootURL } from "../../api/api.ts";
Expand All @@ -26,7 +25,7 @@ import styles from "./PacsApp.module.css";
import PacsView from "./PacsView.tsx";
import type { PacsState } from "./types.ts";

type TDoPacs = ModuleToFunc<typeof DoPacs>;
type TDoPacs = ThunkModuleToFunc<typeof DoPacs>;

/**
* ChRIS_ui "PACS Query and Retrieve" controller + view.
Expand Down Expand Up @@ -76,10 +75,7 @@ export default () => {
// ========================================
// CLIENTS AND MISC
// ========================================
const [statePacs, doPacs] = useReducer<DoPacs.State, TDoPacs>(
DoPacs,
StateType.LOCAL,
);
const [statePacs, doPacs] = useThunk<DoPacs.State, TDoPacs>(DoPacs);
const [searchParams, setSearchParams] = useSearchParams();
const location = useLocation();
const [pacsID, _] = useState(genUUID());
Expand Down
5 changes: 0 additions & 5 deletions src/components/Pacs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import type { ModuleToFunc } from "react-reducer-utils";
import { useReducer } from "react-reducer-utils";
import type * as DoPacs from "../../reducers/pacs";
import { InfoSection } from "../Common";
import Wrapper from "../Wrapper";
import PacsApp from "./PacsApp.tsx";

type TDoPacs = ModuleToFunc<typeof DoPacs>;

const PacsTitle = () => (
<InfoSection
title="Query and Retrieve PACS"
Expand Down
3 changes: 0 additions & 3 deletions src/reducers/pacs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type { ReadonlyNonEmptyArray } from "fp-ts/lib/ReadonlyNonEmptyArray";
import {
init as _init,
type ClassState,
createReducer,
type Dispatch,
getState,
type State as rState,
Expand Down Expand Up @@ -1181,5 +1180,3 @@ const checkIsToPullRequestSeries = (
const isPullStateNeedToPullRequest = (pullState: SeriesPullState) => {
return pullState === SeriesPullState.READY;
};

export default createReducer<State>();
2 changes: 1 addition & 1 deletion testing/miniChRIS
Submodule miniChRIS updated 1 files
+6 −8 docker-compose.yml