Skip to content

Commit

Permalink
Merge pull request #1070 from PintoGideon/bug-fixes
Browse files Browse the repository at this point in the history
Add the type to PacsQueryContext
  • Loading branch information
PintoGideon authored Feb 16, 2024
2 parents 5db2fe9 + a7cc80b commit 12a239e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/Pacs/context/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ export function getIndex(value: string) {
return -1; // Return -1 if the value is not found in the object.
}

const PacsQueryContext = createContext<
| {
state: PacsQueryState;
dispatch: Dispatch<PacsQueryActions>;
}
| undefined
>(undefined);
const PacsQueryContext = createContext<{
state: PacsQueryState;
dispatch: Dispatch<PacsQueryActions>;
}>({
state: initialState,
dispatch: () => null,
});

const pacsQueryReducer = (state: PacsQueryState, action: PacsQueryActions) => {
switch (action.type) {
Expand Down

0 comments on commit 12a239e

Please sign in to comment.