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.

21 lines
420 B

// favoritesActions.js
import { ADD_TO_FAVORITES, REMOVE_FROM_FAVORITES, SET_FAVORITES } from "../constants";
export const addToFavorites = weather => ({
type: ADD_TO_FAVORITES,
payload: weather,
});
export const removeFromFavorites = weatherId => ({
type: REMOVE_FROM_FAVORITES,
payload: weatherId,
});
export const setFavorites = favorites => ({
type: SET_FAVORITES,
payload: favorites,
});