diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-10 00:19:17 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-10 00:19:17 +0300 |
commit | dfa6f0a8d1415539e1ff6a3ca848627bbe87b470 (patch) | |
tree | 2d2f6cdf85e10acef7b675f5f91e0e50bb8f7f87 /src/components | |
parent | fd6e663a1bcc43cfc49bda99ccbfab380489324b (diff) | |
download | which-ui-dfa6f0a8d1415539e1ff6a3ca848627bbe87b470.tar.gz |
fix: show Feed loading correctly
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Feed/Feed.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
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<PropTypes> = ({ polls }) => { ); }; - const list = ( + return ( <WindowScroller> {({ height, @@ -57,8 +57,6 @@ const Feed: React.FC<PropTypes> = ({ polls }) => { )} </WindowScroller> ); - - return polls.length ? list : <Loading />; }; export default Feed; |