Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ishpaul777 committed May 13, 2024
1 parent da41661 commit c134239
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/components/PDFView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import 'core-js/features/array/at';
import type {CSSProperties} from 'react';
import React, {memo, useCallback, useEffect, useState} from 'react';
import {PDFPreviewer} from 'react-fast-pdf';
import {ActivityIndicator, View} from 'react-native';
import {View} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback';
import useLocalize from '@hooks/useLocalize';
import usePrevious from '@hooks/usePrevious';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import variables from '@styles/variables';
Expand All @@ -27,7 +26,6 @@ function PDFView({onToggleKeyboard, fileName, onPress, isFocused, sourceURL, max
const [isKeyboardOpen, setIsKeyboardOpen] = useState(false);
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const theme = useTheme();
const {windowHeight, isSmallScreenWidth} = useWindowDimensions();
const prevWindowHeight = usePrevious(windowHeight);
const {translate} = useLocalize();
Expand Down Expand Up @@ -101,7 +99,17 @@ function PDFView({onToggleKeyboard, fileName, onPress, isFocused, sourceURL, max
maxCanvasWidth={maxCanvasWidth}
maxCanvasHeight={maxCanvasHeight}
maxCanvasArea={maxCanvasArea}
LoadingComponent={<FullScreenLoadingIndicator style={isUsedAsChatAttachment && [styles.chatItemPDFAttachmentLoading, StyleUtils.getWidthAndHeightStyle(LOADING_THUMBNAIL_WIDTH, LOADING_THUMBNAIL_HEIGHT), styles.pRelative]} />}
LoadingComponent={
<FullScreenLoadingIndicator
style={
isUsedAsChatAttachment && [
styles.chatItemPDFAttachmentLoading,
StyleUtils.getWidthAndHeightStyle(LOADING_THUMBNAIL_WIDTH, LOADING_THUMBNAIL_HEIGHT),
styles.pRelative,
]
}
/>
}
shouldShowErrorComponent={false}
onLoadError={onLoadError}
renderPasswordForm={({isPasswordInvalid, onSubmit, onPasswordChange}) => (
Expand Down

0 comments on commit c134239

Please sign in to comment.