From 329f27302ab640532eb81781a32462347912b93d Mon Sep 17 00:00:00 2001 From: sumo_slonik Date: Wed, 27 Nov 2024 14:04:52 +0100 Subject: [PATCH 1/7] migrate AttachmentModal.tsx --- src/components/AttachmentModal.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/AttachmentModal.tsx b/src/components/AttachmentModal.tsx index 207f3eed6f8ca..b2f7088cd3ad5 100644 --- a/src/components/AttachmentModal.tsx +++ b/src/components/AttachmentModal.tsx @@ -1,15 +1,14 @@ import {Str} from 'expensify-common'; import React, {memo, useCallback, useEffect, useMemo, useRef, useState} from 'react'; -import {Animated, Keyboard, View} from 'react-native'; +import {Keyboard, View} from 'react-native'; import {GestureHandlerRootView} from 'react-native-gesture-handler'; import {useOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; -import {useSharedValue} from 'react-native-reanimated'; +import Animated, {FadeIn, useSharedValue} from 'react-native-reanimated'; import type {ValueOf} from 'type-fest'; import useLocalize from '@hooks/useLocalize'; import useNetwork from '@hooks/useNetwork'; import useResponsiveLayout from '@hooks/useResponsiveLayout'; -import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; import useWindowDimensions from '@hooks/useWindowDimensions'; import addEncryptedAuthTokenToURL from '@libs/addEncryptedAuthTokenToURL'; @@ -166,7 +165,6 @@ function AttachmentModal({ attachmentLink = '', }: AttachmentModalProps) { const styles = useThemeStyles(); - const StyleUtils = useStyleUtils(); const [isModalOpen, setIsModalOpen] = useState(defaultOpen); const [shouldLoadAttachment, setShouldLoadAttachment] = useState(false); const [isAttachmentInvalid, setIsAttachmentInvalid] = useState(false); @@ -177,7 +175,6 @@ function AttachmentModal({ const [sourceState, setSourceState] = useState(() => source); const [modalType, setModalType] = useState(CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE); const [isConfirmButtonDisabled, setIsConfirmButtonDisabled] = useState(false); - const [confirmButtonFadeAnimation] = useState(() => new Animated.Value(1)); const [isDownloadButtonReadyToBeShown, setIsDownloadButtonReadyToBeShown] = React.useState(true); const isPDFLoadError = useRef(false); const {windowWidth} = useWindowDimensions(); @@ -590,7 +587,10 @@ function AttachmentModal({ {!!onConfirm && !isConfirmButtonDisabled && ( {({safeAreaPaddingBottomStyle}) => ( - +