diff options
author | Eugene Sokolov <eug-vs@keemail.me> | 2020-08-14 20:45:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-14 20:45:22 +0300 |
commit | 845eaf8d28fdd992faf0fba0dcafdc61ef53ef35 (patch) | |
tree | cc4e4065a9bae7e8e9d574ee6886080855975b24 /src/components/PollCard | |
parent | 9073af9512687e724a5237d55a85656abb3305e5 (diff) | |
parent | 21e5bf9ee3dc4f284c10f7915921e1e407b65b5a (diff) | |
download | which-ui-845eaf8d28fdd992faf0fba0dcafdc61ef53ef35.tar.gz |
Merge pull request #83 from which-ecosystem/better-ux
Crazy performance boost
Diffstat (limited to 'src/components/PollCard')
-rw-r--r-- | src/components/PollCard/PollCard.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/PollCard/PollCard.tsx b/src/components/PollCard/PollCard.tsx index a4c2144..749c6b7 100644 --- a/src/components/PollCard/PollCard.tsx +++ b/src/components/PollCard/PollCard.tsx @@ -45,7 +45,7 @@ const useStyles = makeStyles(theme => ({ } })); -const PollCard: React.FC<PropTypes> = ({ poll, setPoll }) => { +const PollCard: React.FC<PropTypes> = React.memo(({ poll, setPoll }) => { const classes = useStyles(); const { author, contents: { left, right }, vote } = poll; const { enqueueSnackbar } = useSnackbar(); @@ -114,6 +114,6 @@ const PollCard: React.FC<PropTypes> = ({ poll, setPoll }) => { </div> </Card> ); -}; +}); export default PollCard; |