Moved all reducers and actions to their own folders
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
} from 'react-admin'
|
||||
import { makeStyles } from '@material-ui/core/styles'
|
||||
import HelpOutlineIcon from '@material-ui/icons/HelpOutline'
|
||||
import { changeTheme } from './actions'
|
||||
import { changeTheme } from '../actions'
|
||||
import themes from '../themes'
|
||||
import { docsUrl } from '../utils/docsUrl'
|
||||
import { useGetLanguageChoices } from '../i18n'
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
export const CHANGE_THEME = 'CHANGE_THEME'
|
||||
|
||||
export const changeTheme = (theme) => ({
|
||||
type: CHANGE_THEME,
|
||||
payload: theme,
|
||||
})
|
||||
@@ -1,8 +0,0 @@
|
||||
import { CHANGE_THEME } from './actions'
|
||||
|
||||
export default (previousState = 'DarkTheme', { type, payload }) => {
|
||||
if (type === CHANGE_THEME) {
|
||||
return payload
|
||||
}
|
||||
return previousState
|
||||
}
|
||||
Reference in New Issue
Block a user