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.
49 lines
663 B
49 lines
663 B
3 years ago
|
import createFetchHandler from 'Store/Actions/Creators/createFetchHandler';
|
||
|
import { createThunk } from 'Store/thunks';
|
||
|
|
||
|
//
|
||
|
// Variables
|
||
|
|
||
|
const section = 'settings.languages';
|
||
|
|
||
|
//
|
||
|
// Actions Types
|
||
|
|
||
|
export const FETCH_LANGUAGES = 'settings/languages/fetchLanguages';
|
||
|
|
||
|
//
|
||
|
// Action Creators
|
||
|
|
||
|
export const fetchLanguages = createThunk(FETCH_LANGUAGES);
|
||
|
|
||
|
//
|
||
|
// Details
|
||
|
|
||
|
export default {
|
||
|
|
||
|
//
|
||
|
// State
|
||
|
|
||
|
defaultState: {
|
||
|
isFetching: false,
|
||
|
isPopulated: false,
|
||
|
error: null,
|
||
|
items: []
|
||
|
},
|
||
|
|
||
|
//
|
||
|
// Action Handlers
|
||
|
|
||
|
actionHandlers: {
|
||
|
[FETCH_LANGUAGES]: createFetchHandler(section, '/language')
|
||
|
},
|
||
|
|
||
|
//
|
||
|
// Reducers
|
||
|
|
||
|
reducers: {
|
||
|
|
||
|
}
|
||
|
|
||
|
};
|