Skip to content

Commit

Permalink
chore: Rename readiology state reset methods
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGT96 committed Dec 6, 2024
1 parent 68cf5ca commit a38b37d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/accessories/radiology/Radiology.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "moment/min/locales";
import React, { useEffect, useMemo } from "react";
import { useTranslation } from "react-i18next";
import { Outlet } from "react-router";
import { getPatientStudies, getStudiesReset } from "state/radiology";
import { getPatientStudies, getPatientStudiesReset } from "state/radiology";

export const Radiology = () => {
const { t, i18n } = useTranslation();
Expand All @@ -27,7 +27,7 @@ export const Radiology = () => {

useEffect(() => {
return () => {
dispatch(getStudiesReset());
dispatch(getPatientStudiesReset());
};
}, [dispatch]);

Expand Down
13 changes: 8 additions & 5 deletions src/state/radiology/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ export const radiologySlice = createSlice({
name: "radiology",
initialState: initial,
reducers: {
getStudiesReset: (state) => {
getPatientStudiesReset: (state) => {
state.studies = initial.studies;
},
getSeriesReset: (state) => {
getStudySeriesReset: (state) => {
state.series = initial.series;
},
getInstancesReset: (state) => {
getSerieInstancesReset: (state) => {
state.instances = initial.instances;
},
},
Expand Down Expand Up @@ -51,5 +51,8 @@ export const radiologySlice = createSlice({
}),
});

export const { getStudiesReset, getSeriesReset, getInstancesReset } =
radiologySlice.actions;
export const {
getPatientStudiesReset,
getStudySeriesReset,
getSerieInstancesReset,
} = radiologySlice.actions;

0 comments on commit a38b37d

Please sign in to comment.