diff options
| author | Wes Bos <wesbos@gmail.com> | 2018-04-05 13:54:22 -0400 |
|---|---|---|
| committer | Wes Bos <wesbos@gmail.com> | 2018-04-05 13:54:22 -0400 |
| commit | f4f10d5eb690a33dd1c112358457a2b987297f26 (patch) | |
| tree | d97326763dd016c13a068fb7dee40fc0b9667f83 /frontend/components/Items.js | |
| parent | a75b2491758a451283e2a373bb3fbe886520b345 (diff) | |
work
Diffstat (limited to 'frontend/components/Items.js')
| -rw-r--r-- | frontend/components/Items.js | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/frontend/components/Items.js b/frontend/components/Items.js index d0e39e9..e26408e 100644 --- a/frontend/components/Items.js +++ b/frontend/components/Items.js @@ -9,7 +9,7 @@ import { ALL_ITEMS_QUERY } from '../queries/index'; const Items = styled.div` display: grid; - grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + grid-template-columns: 1fr 1fr; grid-gap: 60px; max-width: ${props => props.theme.maxWidth}; margin: 0 auto; @@ -44,20 +44,7 @@ class ItemList extends React.Component { {({ data, error, loading, variables, refetch }) => { if (loading) return <div>Loading</div>; if (error) return <div>Error</div>; - return ( - <Items key={this.props.page}> - {data.items.map(item => <Item key={item.id} item={item} />)} - <button - onClick={() => { - console.log('Refetching..'); - console.log(refetch); - refetch(); - }} - > - refetch - </button> - </Items> - ); + return <Items key={this.props.page}>{data.items.map(item => <Item key={item.id} item={item} />)}</Items>; }} </Query> <Pagination page={this.props.page} /> |
