All files / src/redux selectors.js

100% Statements 10/10
85.71% Branches 6/7
100% Functions 4/4
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 1511x   11x 2x 1x     11x   11x 1x        
export const getToken = state => state.user.auth_token;
 
export const getAlbums = state => {
  if (!state.search) return {};
  else return state.search.albums;
};
 
export const getRecommendations = state => state.recommendations;
 
export const getSearchText = state => {
  return state.search && state.search.albums && state.search.albums.searchText
    ? state.search.albums.searchText
    : "";
};