import { Fragment } from 'react';
import Cards from './cards';
import PaginatedFetcher from '../shared/fetches/paginated-fetcher';
import { fetchCards } from '../../redux/actions/card';

function CardsContainer() {
  return (
    <Fragment>
      <PaginatedFetcher action={fetchCards} stateSelector={state => state.cards}>
        {cards => <Cards cards={cards} />}
      </PaginatedFetcher>
    </Fragment>
  );
}

export default CardsContainer;
