swimtracker-app/state/ActionCreators.js

31 lines
526 B
JavaScript
Raw Normal View History

2020-06-02 17:19:09 +02:00
2020-06-02 17:19:09 +02:00
export const CHANGE_USER_NAME = "SET_USERNAME";
export const CHANGE_THEME = "CHANGE_THEME";
2020-06-23 21:36:14 +02:00
export const RESET_DEVICE_DATA = "RESET_DEVICE_DATA";
2020-06-02 17:19:09 +02:00
2020-06-23 21:36:14 +02:00
2020-06-02 17:19:09 +02:00
export const changeUsername = newUsername => ({
type: CHANGE_USER_NAME,
newUserName: newUsername,
});
2020-06-02 17:19:09 +02:00
export const changeTheme = newThemeName => ({
type: CHANGE_THEME,
newThemeName: newThemeName
});
2020-06-02 17:19:09 +02:00
export const startSession = () => ({
type: START_SESSION
});
2020-06-02 22:43:48 +02:00
export const stopSession = () => ({
type: STOP_SESSION
});
// ---------------------