Preview: pagesReducer.ts
Size: 412 B
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/src/frontend/store/reducers/pagesReducer.ts
import type { PageJSON } from '../../interfaces/page-json.interface.js'
import { PAGES_INITIALIZE } from '../actions/initialize-pages.js'
export type PagesInState = Array<PageJSON>
export const pagesReducer = (
state: PagesInState = [],
action: {
type: string
data: PagesInState
},
) => {
switch (action.type) {
case PAGES_INITIALIZE:
return action.data
default:
return state
}
}
Directory Contents
Dirs: 0 × Files: 16