Skip to content

Commit

Permalink
fix(fetproducts): apply properly Flow's typing
Browse files Browse the repository at this point in the history
  • Loading branch information
aneurysmjs committed Aug 18, 2019
1 parent bcd2b66 commit 72cf431
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/store/actions/fetchProducts.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { State } from '@/store/types/State';

import * as types from '../ActionTypes';

export default function fetchProducts(query: string = ''): AsyncAction<ProductsType> {
export default function fetchProducts(query: string = ''): AsyncAction<State> {
return {
types: [
types.GET_PRODUCTS_REQUEST,
Expand All @@ -19,8 +19,6 @@ export default function fetchProducts(query: string = ''): AsyncAction<ProductsT
callAPI: () => api.get<string, ProductsType>(query),
shouldCallAPI: (state: State) => {
const products = getProducts(state);
// eslint-disable-next-line no-console
console.log('products', products);
return !products.length;
},
};
Expand Down

0 comments on commit 72cf431

Please sign in to comment.