File size: 421 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { VersionProps } from '../../../adminjs-options.interface.js'
import { VERSIONS_INITIALIZE } from '../actions/initialize-versions.js'

export const versionsReducer = (
  state = {},
  action: {
    type: string;
    data: VersionProps;
  },
) => {
  switch (action.type) {
  case VERSIONS_INITIALIZE:
    return {
      admin: action.data.admin,
      app: action.data.app,
    }
  default:
    return state
  }
}