aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-10 00:19:17 +0300
committereug-vs <eug-vs@keemail.me>2020-08-10 00:19:17 +0300
commitdfa6f0a8d1415539e1ff6a3ca848627bbe87b470 (patch)
tree2d2f6cdf85e10acef7b675f5f91e0e50bb8f7f87 /src/components
parentfd6e663a1bcc43cfc49bda99ccbfab380489324b (diff)
downloadwhich-ui-dfa6f0a8d1415539e1ff6a3ca848627bbe87b470.tar.gz
fix: show Feed loading correctly
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Feed/Feed.tsx6
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;