Skip to content

Commit

Permalink
front: reset stdcm config slice
Browse files Browse the repository at this point in the history
Signed-off-by: Achraf Mohyeddine <[email protected]>
  • Loading branch information
achrafmohye committed Dec 13, 2024
1 parent 9f90bf6 commit 3d92ef1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const StdcmConfig = ({
updateGridMarginBefore,
updateStdcmStandardAllowance,
updateStdcmPathStep,
resetStdcmPathSteps,
resetStdcmConfig,
} = useOsrdConfActions() as StdcmConfSliceActions;

const {
Expand Down Expand Up @@ -141,7 +141,7 @@ const StdcmConfig = ({
}, [infra]);

useEffect(() => {
dispatch(resetStdcmPathSteps());
dispatch(resetStdcmConfig());
}, []);

return (
Expand Down
3 changes: 0 additions & 3 deletions front/src/reducers/osrdconf/stdcmConf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ export const stdcmConfSlice = createSlice({
);
state.stdcmPathSteps = newPathSteps;
},
resetStdcmPathSteps(state: Draft<OsrdStdcmConfState>) {
state.stdcmPathSteps = stdcmConfInitialState.stdcmPathSteps;
},

addStdcmVia(state: Draft<OsrdStdcmConfState>, action: PayloadAction<number>) {
// Index takes count of the origin in the array
Expand Down

0 comments on commit 3d92ef1

Please sign in to comment.