appList.js 414B

12345678910111213141516171819
  1. import { SET, APP_LIST } from '../action-creator.sync.js'
  2. export default function app (state = [], action) {
  3. switch (action.type) {
  4. case `${SET}/${APP_LIST}`:
  5. return action.appList.map(a => ({
  6. label: a.label,
  7. slug: a.slug,
  8. isActive: a.is_active,
  9. faIcon: a.fa_icon,
  10. hexcolor: a.hexcolor,
  11. config: a.config
  12. }))
  13. default:
  14. return state
  15. }
  16. }