From dfa6f0a8d1415539e1ff6a3ca848627bbe87b470 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Mon, 10 Aug 2020 00:19:17 +0300 Subject: fix: show Feed loading correctly --- src/components/Feed/Feed.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/components') diff --git a/src/components/Feed/Feed.tsx b/src/components/Feed/Feed.tsx index 5805e35..bf3c5b7 100644 --- a/src/components/Feed/Feed.tsx +++ b/src/components/Feed/Feed.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Poll } from 'which-types'; import { WindowScroller, AutoSizer, List } from 'react-virtualized'; import PollCard from '../PollCard/PollCard'; -import Loading from '../Loading/Loading'; + interface PropTypes { polls: Poll[]; @@ -26,7 +26,7 @@ const Feed: React.FC = ({ polls }) => { ); }; - const list = ( + return ( {({ height, @@ -57,8 +57,6 @@ const Feed: React.FC = ({ polls }) => { )} ); - - return polls.length ? list : ; }; export default Feed; -- cgit v1.2.3