aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-14 19:19:04 +0300
committereug-vs <eug-vs@keemail.me>2020-08-14 19:19:04 +0300
commitf78da28da3ee30b0c458c10c97db9ae7d2c6372d (patch)
tree0a7db175977a05feac099755db9a08102eac27e0 /src
parentc3ebdfe3b959f0d4a670e08176e71906107041af (diff)
downloadwhich-ui-f78da28da3ee30b0c458c10c97db9ae7d2c6372d.tar.gz
feat: memoize PollCard component
Diffstat (limited to 'src')
-rw-r--r--src/components/PollCard/PollCard.tsx4
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;