Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/components/ImportSpreadsheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import {setSpreadsheetData} from '@libs/actions/ImportSpreadsheet';
import * as DeviceCapabilities from '@libs/DeviceCapabilities';
import * as FileUtils from '@libs/fileDownload/FileUtils';
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
import {splitExtensionFromFileName} from '@libs/fileDownload/FileUtils';
import Navigation from '@libs/Navigation/Navigation';
import CONST from '@src/CONST';
import type {TranslationPaths} from '@src/languages/types';
Expand Down Expand Up @@ -60,7 +60,7 @@ function ImportSpreadsheet({backTo, goTo}: ImportSpreedsheetProps) {
};

const validateFile = (file: FileObject) => {
const {fileExtension} = FileUtils.splitExtensionFromFileName(file?.name ?? '');
const {fileExtension} = splitExtensionFromFileName(file?.name ?? '');
if (!CONST.ALLOWED_SPREADSHEET_EXTENSIONS.includes(fileExtension.toLowerCase() as TupleToUnion<typeof CONST.ALLOWED_SPREADSHEET_EXTENSIONS>)) {
setUploadFileError(true, 'attachmentPicker.wrongFileType', 'attachmentPicker.notAllowedExtension');
return false;
Expand Down Expand Up @@ -163,7 +163,7 @@ function ImportSpreadsheet({backTo, goTo}: ImportSpreedsheetProps) {
includeSafeAreaPaddingBottom={false}
shouldEnableKeyboardAvoidingView={false}
testID={ImportSpreadsheet.displayName}
shouldEnableMaxHeight={DeviceCapabilities.canUseTouchScreen()}
shouldEnableMaxHeight={canUseTouchScreen()}
headerGapStyles={isDraggingOver ? [styles.isDraggingOver] : []}
>
{({safeAreaPaddingBottomStyle}) => (
Expand Down Expand Up @@ -207,6 +207,7 @@ function ImportSpreadsheet({backTo, goTo}: ImportSpreedsheetProps) {
prompt={attachmentInvalidReason ? translate(attachmentInvalidReason) : ''}
confirmText={translate('common.close')}
shouldShowCancelButton={false}
shouldHandleNavigationBack
/>
</View>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function ImportedCategoriesPage({route}: ImportedCategoriesPageProps) {
onCancel={closeImportPageAndModal}
confirmText={translate('common.buttonConfirm')}
shouldShowCancelButton={false}
shouldHandleNavigationBack
/>
</ScreenWrapper>
);
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/members/ImportedMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ function ImportedMembersPage({route}: ImportedMembersPageProps) {
onCancel={closeImportPageAndModal}
confirmText={translate('common.buttonConfirm')}
shouldShowCancelButton={false}
shouldHandleNavigationBack
/>
</ScreenWrapper>
);
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/tags/ImportedTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function ImportedTagsPage({route}: ImportedTagsPageProps) {
onCancel={closeImportPageAndModal}
confirmText={translate('common.buttonConfirm')}
shouldShowCancelButton={false}
shouldHandleNavigationBack
/>
</ScreenWrapper>
);
Expand Down