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.
18 lines
472 B
18 lines
472 B
4 years ago
|
import * as actionConstants from '../../store/actionConstants';
|
||
7 years ago
|
|
||
4 years ago
|
export default function reduceLocaleMessages(state = {}, { type, value }) {
|
||
5 years ago
|
switch (type) {
|
||
5 years ago
|
case actionConstants.SET_CURRENT_LOCALE:
|
||
5 years ago
|
return {
|
||
5 years ago
|
...state,
|
||
|
current: value.messages,
|
||
4 years ago
|
};
|
||
7 years ago
|
default:
|
||
4 years ago
|
return state;
|
||
7 years ago
|
}
|
||
|
}
|
||
5 years ago
|
|
||
4 years ago
|
export const getCurrentLocaleMessages = (state) => state.localeMessages.current;
|
||
5 years ago
|
|
||
4 years ago
|
export const getEnLocaleMessages = (state) => state.localeMessages.en;
|