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.
19 lines
431 B
19 lines
431 B
import {FETCH_TRENDINGMOVIE} from "../constants";
|
|
|
|
|
|
const initialState = {
|
|
trendingMovies : [],
|
|
favoriteMovies : [],
|
|
watchLaterMovies : [],
|
|
}
|
|
|
|
// @ts-ignore
|
|
export default appReducer = (state = initialState, action)=> {
|
|
switch (action.type){
|
|
case FETCH_TRENDINGMOVIE:
|
|
// @ts-ignore
|
|
return {...state, trendingMovies: action.payload};
|
|
default:
|
|
return state;
|
|
}
|
|
} |