summaryrefslogtreecommitdiffstats
path: root/frontend/components/Count.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-03-14 21:25:32 -0400
committerWes Bos <wesbos@gmail.com>2018-03-14 21:25:32 -0400
commite3aaf8d61e6abde276d4f5649bf86723515ac73c (patch)
tree34e742a4242dd4e50cd9f306b0754d33fbcd991e /frontend/components/Count.js
parentbd45d4c7aac6d1c6b054185058a96b2e01669828 (diff)
more tests, remove unnessecary files
Diffstat (limited to 'frontend/components/Count.js')
-rw-r--r--frontend/components/Count.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/frontend/components/Count.js b/frontend/components/Count.js
deleted file mode 100644
index 7dfd33f..0000000
--- a/frontend/components/Count.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// TODO THis is not needed
-import React, { Component } from 'react'
-import { graphql, gql } from 'react-apollo'
-
-import { ALL_ITEMS_QUERY } from '../queries';
-
-class Count extends Component {
-
- render() {
-
- // 1
- if (this.props.allLinksQuery && this.props.allLinksQuery.loading) {
- return <div>Loading</div>
- }
-
- // 2
- if (this.props.allLinksQuery && this.props.allLinksQuery.error) {
- return <div>Error</div>
- }
-
- // 3
- const itemsToRender = this.props.allLinksQuery.allItems
-
- return (
- <div>
- <h1>There are {itemsToRender.length} items for sale</h1>
- </div>
- )
- }
-
-}
-
-// 1
-
-// We export the graphQL HOC - this will fetch the data and inject it into the Count compeont via props
-
-export default graphql(ALL_ITEMS_QUERY, { name: 'allLinksQuery' })(Count)