import Store from './store';
import Fetcher from '../shared/fetches/fetcher';
import NoDeck from './no-deck';
import { fetchDecks } from '../../redux/actions/deck';

function StoreContainer() {
  return (
    <Fetcher
      action={fetchDecks}
      stateSelector={state => state.decks}
      renderEmpty={() => <NoDeck />}
    >
      {decks => <Store decks={decks} />}
    </Fetcher>
  );
}

export default StoreContainer;
