-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
front: replace selector getConf by getStdcmConf and getOperationalStu…
…diesConf Signed-off-by: Clara Ni <[email protected]>
- Loading branch information
Showing
7 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 8 additions & 7 deletions
15
front/src/reducers/osrdconf/operationalStudiesConf/selectors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import { | ||
operationalStudiesConfSlice, | ||
type OperationalStudiesConfState, | ||
} from 'reducers/osrdconf/operationalStudiesConf'; | ||
import type { RootState } from 'reducers'; | ||
import { operationalStudiesConfSlice } from 'reducers/osrdconf/operationalStudiesConf'; | ||
import buildCommonConfSelectors from 'reducers/osrdconf/osrdConfCommon/selectors'; | ||
|
||
const buildOperationalStudiesConfSelectors = () => { | ||
const commonConfSelectors = buildCommonConfSelectors<OperationalStudiesConfState>( | ||
operationalStudiesConfSlice | ||
); | ||
const commonConfSelectors = buildCommonConfSelectors(operationalStudiesConfSlice); | ||
const getOperationalStudiesConf = (state: RootState) => state[operationalStudiesConfSlice.name]; | ||
|
||
return { | ||
...commonConfSelectors, | ||
getOperationalStudiesConf, | ||
}; | ||
}; | ||
|
||
const selectors = buildOperationalStudiesConfSelectors(); | ||
|
||
export const { getOperationalStudiesConf } = selectors; | ||
|
||
export type OperationalStudiesConfSelectors = typeof selectors; | ||
|
||
export default selectors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters