swimtracker-app/state/ActionCreators.js

31 lines
526 B
JavaScript

export const CHANGE_USER_NAME = "SET_USERNAME";
export const CHANGE_THEME = "CHANGE_THEME";
export const RESET_DEVICE_DATA = "RESET_DEVICE_DATA";
export const changeUsername = newUsername => ({
type: CHANGE_USER_NAME,
newUserName: newUsername,
});
export const changeTheme = newThemeName => ({
type: CHANGE_THEME,
newThemeName: newThemeName
});
export const startSession = () => ({
type: START_SESSION
});
export const stopSession = () => ({
type: STOP_SESSION
});
// ---------------------