From 39de868383957ff8de2190c46a6309657998afc4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 13 Oct 2023 11:09:04 -0500 Subject: [PATCH] Upload: switch requires to imports --- src/components/upload.tsx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/upload.tsx b/src/components/upload.tsx index 3c52f24e1..fdca2669b 100644 --- a/src/components/upload.tsx +++ b/src/components/upload.tsx @@ -1,3 +1,12 @@ +import bookIcon from '@tabler/icons/book.svg'; +import fileCodeIcon from '@tabler/icons/file-code.svg'; +import fileSpreadsheetIcon from '@tabler/icons/file-spreadsheet.svg'; +import fileTextIcon from '@tabler/icons/file-text.svg'; +import fileZipIcon from '@tabler/icons/file-zip.svg'; +import defaultIcon from '@tabler/icons/paperclip.svg'; +import presentationIcon from '@tabler/icons/presentation.svg'; +import xIcon from '@tabler/icons/x.svg'; +import zoomInIcon from '@tabler/icons/zoom-in.svg'; import clsx from 'clsx'; import { List as ImmutableList } from 'immutable'; import React, { useState } from 'react'; @@ -12,14 +21,6 @@ import Motion from 'soapbox/features/ui/util/optional-motion'; import { useAppDispatch } from 'soapbox/hooks'; import { Attachment } from 'soapbox/types/entities'; -const bookIcon = require('@tabler/icons/book.svg'); -const fileCodeIcon = require('@tabler/icons/file-code.svg'); -const fileSpreadsheetIcon = require('@tabler/icons/file-spreadsheet.svg'); -const fileTextIcon = require('@tabler/icons/file-text.svg'); -const fileZipIcon = require('@tabler/icons/file-zip.svg'); -const defaultIcon = require('@tabler/icons/paperclip.svg'); -const presentationIcon = require('@tabler/icons/presentation.svg'); - export const MIMETYPE_ICONS: Record = { 'application/x-freearc': fileZipIcon, 'application/x-bzip': fileZipIcon, @@ -163,7 +164,7 @@ const Upload: React.FC = ({ {(withPreview && mediaType !== 'unknown' && Boolean(media.url)) && ( = ({ {onDelete && (