From 2293cbf1f0b8b7fd1bb2db7f2206f6462ac315c2 Mon Sep 17 00:00:00 2001 From: Daniel Abramov Date: Mon, 3 Jul 2023 18:28:43 +0100 Subject: [PATCH] Use memoized callbacks when passing to components --- src/home/CallTypeDropdown.tsx | 13 ++++++++----- src/room/GridLayoutMenu.tsx | 13 +++++++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/home/CallTypeDropdown.tsx b/src/home/CallTypeDropdown.tsx index 9b02f350..f24d3d48 100644 --- a/src/home/CallTypeDropdown.tsx +++ b/src/home/CallTypeDropdown.tsx @@ -42,6 +42,12 @@ interface Props { export const CallTypeDropdown: FC = ({ callType, setCallType }) => { const { t } = useTranslation(); + const onAction = (key: React.Key) => { + setCallType(key.toString() as CallType); + }; + + const onClose = () => {}; + return (