From 2d145b026cfdf54a63bef0b9d6324b6785390307 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Fri, 14 Sep 2018 12:18:12 -0400 Subject: move finished folder --- .../FINISHED/frontend/components/Pagination.js | 67 ---------------------- 1 file changed, 67 deletions(-) delete mode 100644 stepped-solutions/FINISHED/frontend/components/Pagination.js (limited to 'stepped-solutions/FINISHED/frontend/components/Pagination.js') diff --git a/stepped-solutions/FINISHED/frontend/components/Pagination.js b/stepped-solutions/FINISHED/frontend/components/Pagination.js deleted file mode 100644 index b84af76..0000000 --- a/stepped-solutions/FINISHED/frontend/components/Pagination.js +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; -import gql from 'graphql-tag'; -import { Query } from 'react-apollo'; -import Head from 'next/head'; -import Link from 'next/link'; -import PaginationStyles from './styles/PaginationStyles'; -import { perPage } from '../config'; - -const PAGINATION_QUERY = gql` - query PAGINATION_QUERY { - itemsConnection { - aggregate { - count - } - } - } -`; - -const Pagination = props => ( - - {({ data, loading, error }) => { - if (loading) return

Loading...

; - const count = data.itemsConnection.aggregate.count; - const pages = Math.ceil(count / perPage); - const page = props.page; - return ( - - - - Sick Fits! — Page {page} of {pages} - - - - - ← Prev - - -

- Page {props.page} of - {pages}! -

-

{count} Items Total

- - = pages}> - Next → - - -
- ); - }} -
-); - -export default Pagination; -export { PAGINATION_QUERY }; -- cgit v1.3