From c70846c7e8d3c3a91badfa6c5955122296428be5 Mon Sep 17 00:00:00 2001 From: truph01 Date: Wed, 19 Jun 2024 11:50:01 +0700 Subject: [PATCH 1/2] Fix: Send button does not response --- .../home/report/ReportActionCompose/SendButton.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose/SendButton.tsx b/src/pages/home/report/ReportActionCompose/SendButton.tsx index c505eb0e32e7..5427a6016d9c 100644 --- a/src/pages/home/report/ReportActionCompose/SendButton.tsx +++ b/src/pages/home/report/ReportActionCompose/SendButton.tsx @@ -8,6 +8,7 @@ import Tooltip from '@components/Tooltip'; import useLocalize from '@hooks/useLocalize'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; +import useWindowDimensions from '@hooks/useWindowDimensions'; import CONST from '@src/CONST'; type SendButtonProps = { @@ -22,7 +23,7 @@ function SendButton({isDisabled: isDisabledProp, handleSendMessage}: SendButtonP const theme = useTheme(); const styles = useThemeStyles(); const {translate} = useLocalize(); - + const {isSmallScreenWidth} = useWindowDimensions(); const Tap = Gesture.Tap().onEnd(() => { handleSendMessage(); }); @@ -33,7 +34,12 @@ function SendButton({isDisabled: isDisabledProp, handleSendMessage}: SendButtonP // Keep focus on the composer when Send message is clicked. onMouseDown={(e) => e.preventDefault()} > - + [ From 26e132739152ae5e2c80bf6aa85217ccf783c16a Mon Sep 17 00:00:00 2001 From: truph01 Date: Wed, 19 Jun 2024 18:26:39 +0700 Subject: [PATCH 2/2] Fix: Use useResponsiveLayout --- src/pages/home/report/ReportActionCompose/SendButton.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose/SendButton.tsx b/src/pages/home/report/ReportActionCompose/SendButton.tsx index 5427a6016d9c..4b902e2c6246 100644 --- a/src/pages/home/report/ReportActionCompose/SendButton.tsx +++ b/src/pages/home/report/ReportActionCompose/SendButton.tsx @@ -6,9 +6,9 @@ import * as Expensicons from '@components/Icon/Expensicons'; import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; import Tooltip from '@components/Tooltip'; import useLocalize from '@hooks/useLocalize'; +import useResponsiveLayout from '@hooks/useResponsiveLayout'; import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; -import useWindowDimensions from '@hooks/useWindowDimensions'; import CONST from '@src/CONST'; type SendButtonProps = { @@ -23,7 +23,7 @@ function SendButton({isDisabled: isDisabledProp, handleSendMessage}: SendButtonP const theme = useTheme(); const styles = useThemeStyles(); const {translate} = useLocalize(); - const {isSmallScreenWidth} = useWindowDimensions(); + const {isSmallScreenWidth} = useResponsiveLayout(); const Tap = Gesture.Tap().onEnd(() => { handleSendMessage(); }); @@ -37,7 +37,7 @@ function SendButton({isDisabled: isDisabledProp, handleSendMessage}: SendButtonP