main.ts 665 B

1234567891011121314151617181920212223242526272829
  1. export const toggleDisplayMode: ReducerFuncType = (state, { payload }) => ({
  2. ...state,
  3. displayMode: payload,
  4. });
  5. export const setNavbarState: ReducerFuncType = (state, { payload }) => ({
  6. ...state,
  7. navbarState: payload,
  8. });
  9. export const setSidebarState: ReducerFuncType = (state, { payload }) => ({
  10. ...state,
  11. sidebarState: payload,
  12. });
  13. export const setTool: ReducerFuncType = (state, { payload }) => ({
  14. ...state,
  15. toolState: payload,
  16. });
  17. export const setInfo: ReducerFuncType = (state, { payload }) => ({
  18. ...state,
  19. info: payload,
  20. });
  21. export const setLoading: ReducerFuncType = (state, { payload }) => ({
  22. ...state,
  23. isLoading: payload,
  24. });