import { ActionWithPayload , TopicActions } from '../actions' ; import { Topic } from '../../../shared/model' ; export function topTopics ( state = [ ] , action ) { switch ( action . type ) { case TopicActions . LOAD_TOP_TOPICS_SUCCESS : return action . payload ; default : return state ; } }