You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
541 B
25 lines
541 B
import { Reducer } from 'redux'
|
|
|
|
import { ConfigActions } from '../actions/config'
|
|
import { ConfigState } from '../types'
|
|
|
|
const initialState: ConfigState = {
|
|
apiUrl: '',
|
|
blobUrl: '',
|
|
media: {
|
|
defaultMaxSize: 0,
|
|
coverMaxSize: 0,
|
|
iconMaxSize: 0,
|
|
}
|
|
}
|
|
|
|
const reducer: Reducer<ConfigState, ConfigActions> = (state = initialState, action) => {
|
|
switch (action.type) {
|
|
case 'CONFIG_SET':
|
|
return action.payload
|
|
default:
|
|
return state
|
|
}
|
|
}
|
|
|
|
export default reducer
|