File size: 495 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import { DEFAULT_PATHS } from '../../../constants.js'
import { PATHS_INITIALIZE } from '../actions/initialize-paths.js'
export type PathsInState = {
rootPath: string;
logoutPath: string;
loginPath: string;
assetsCDN?: string;
};
export const pathsReducer = (
state: PathsInState = DEFAULT_PATHS,
action: {
type: string;
data: PathsInState;
},
): PathsInState => {
switch (action.type) {
case PATHS_INITIALIZE:
return action.data
default:
return state
}
}
|