From e3aaf8d61e6abde276d4f5649bf86723515ac73c Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Wed, 14 Mar 2018 21:25:32 -0400 Subject: more tests, remove unnessecary files --- frontend/components/Count.js | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 frontend/components/Count.js (limited to 'frontend/components/Count.js') 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
Loading
- } - - // 2 - if (this.props.allLinksQuery && this.props.allLinksQuery.error) { - return
Error
- } - - // 3 - const itemsToRender = this.props.allLinksQuery.allItems - - return ( -
-

There are {itemsToRender.length} items for sale

-
- ) - } - -} - -// 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) -- cgit v1.3