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.
40 lines
830 B
40 lines
830 B
import createFetchHandler from 'Store/Actions/Creators/createFetchHandler';
|
|
import { createThunk, handleThunks } from 'Store/thunks';
|
|
import createHandleActions from './Creators/createHandleActions';
|
|
|
|
//
|
|
// Variables
|
|
|
|
export const section = 'localization';
|
|
|
|
//
|
|
// State
|
|
|
|
export const defaultState = {
|
|
isFetching: false,
|
|
isPopulated: false,
|
|
error: null,
|
|
items: []
|
|
};
|
|
|
|
//
|
|
// Actions Types
|
|
|
|
export const FETCH_LOCALIZATION_OPTIONS = 'localization/fetchLocalizationOptions';
|
|
|
|
//
|
|
// Action Creators
|
|
|
|
export const fetchLocalizationOptions = createThunk(FETCH_LOCALIZATION_OPTIONS);
|
|
|
|
//
|
|
// Action Handlers
|
|
export const actionHandlers = handleThunks({
|
|
|
|
[FETCH_LOCALIZATION_OPTIONS]: createFetchHandler(section, '/localization/options')
|
|
});
|
|
|
|
//
|
|
// Reducers
|
|
export const reducers = createHandleActions({}, defaultState, section);
|