From e0c628528142f26ce9a42ba4c3c5d2cb41114a56 Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 10 May 2018 15:06:29 -0400 Subject: migrate styles --- frontend/components/Items.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'frontend/components/Items.js') diff --git a/frontend/components/Items.js b/frontend/components/Items.js index 1289de1..9489f5d 100644 --- a/frontend/components/Items.js +++ b/frontend/components/Items.js @@ -4,6 +4,7 @@ import styled from 'styled-components'; import PropTypes from 'prop-types'; import Pagination from './Pagination'; import Item from './Item'; +import LoadingItem from './LoadingItem'; import { perPage } from '../config'; import { ALL_ITEMS_QUERY } from '../queries/queries'; @@ -43,7 +44,15 @@ class ItemList extends React.Component { fetchPolicy={fetchPolicy} > {({ data, error, loading }) => { - if (loading) return null; + if (loading) { + return ( + + {Array.from({ length: 4 }) + .map((x, id) => ({ id })) + .map(x => )} + + ); + } if (error) return
Error
; return {data.items.map(item => )}; }} -- cgit v1.3