From 2e4e67d5789de2fb736becb6b349fc4d2037c385 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 3 Jul 2020 18:15:21 +0300 Subject: fix: immediately show new poll --- src/pages/FeedPage/FeedPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pages/FeedPage') diff --git a/src/pages/FeedPage/FeedPage.tsx b/src/pages/FeedPage/FeedPage.tsx index d29103a..b591141 100644 --- a/src/pages/FeedPage/FeedPage.tsx +++ b/src/pages/FeedPage/FeedPage.tsx @@ -19,7 +19,8 @@ const FeedPage: React.FC = () => { const addPoll = (poll: Poll): void => { polls.unshift(poll); - setPolls([...polls]); + setPolls([]); + setPolls(polls); }; -- cgit v1.2.3