Preview: pathsReducer.ts
Size: 495 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/frontend/store/reducers/pathsReducer.ts
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
}
}
Directory Contents
Dirs: 0 × Files: 16