hedgedoc/src/redux/application-config/actions.ts
Philip Molares 93ce059577 imported current state of the mockup into the public repo
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2020-05-14 15:41:38 +02:00

20 lines
572 B
TypeScript

import {Action, ActionCreator} from 'redux';
import {ApplicationConfigState} from "./types";
export const SET_APPLICATION_CONFIG_ACTION_TYPE = 'config/set';
export interface SetApplicationConfigAction extends Action {
type: string;
payload: {
state: ApplicationConfigState;
};
}
export const setApplicationConfig: ActionCreator<SetApplicationConfigAction> = (state: ApplicationConfigState) => ({
type: SET_APPLICATION_CONFIG_ACTION_TYPE,
payload: {
state
},
})
export type ApplicationConfigActions = SetApplicationConfigAction;