diff options
Diffstat (limited to 'src/components/PollsList/PollsList.tsx')
-rw-r--r-- | src/components/PollsList/PollsList.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/PollsList/PollsList.tsx b/src/components/PollsList/PollsList.tsx index 0fd8fa4..c95bfde 100644 --- a/src/components/PollsList/PollsList.tsx +++ b/src/components/PollsList/PollsList.tsx @@ -17,13 +17,12 @@ interface RenderPropTypes { const PollsList: React.FC<PropTypes> = ({ polls, mutate }) => { - const RenderItem: React.FC<RenderPropTypes> = ({ index, style, key }) => { const poll = polls[index]; - const setPoll = (poll: Poll) => { + const setPoll = (newPoll: Poll) => { const newPolls = [...polls]; - newPolls[index] = poll; + newPolls[index] = newPoll; // Force-update list-size so everything re-renders mutate([], false); |