Rocket.Chat.ReactNative/app/reducers/markdown.js

18 lines
290 B
JavaScript

import { TOGGLE_MARKDOWN } from '../actions/actionsTypes';
const initialState = {
useMarkdown: true
};
export default (state = initialState, action) => {
switch (action.type) {
case TOGGLE_MARKDOWN:
return {
useMarkdown: action.payload
};
default:
return state;
}
};