File size: 412 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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
}
}
|