diff --git a/frontend/src/components/ImageUploadPresignedModal/index.tsx b/frontend/src/components/ImageUploadPresignedModal/index.tsx index bf134e3..11a641d 100644 --- a/frontend/src/components/ImageUploadPresignedModal/index.tsx +++ b/frontend/src/components/ImageUploadPresignedModal/index.tsx @@ -6,7 +6,7 @@ import ImageUploadPresingedForm from '@/components/ImageUploadPresignedModal/Ima export default function ImageUploadPresignedModal({ projectId, folderId }: { projectId: number; folderId: number }) { const [isOpen, setIsOpen] = React.useState(false); const [fileCount, setFileCount] = React.useState(0); - + const handleOpen = () => setIsOpen(true); const handleClose = () => setIsOpen(false); const handleFileCount = (fileCount: number) => { @@ -27,7 +27,7 @@ export default function ImageUploadPresignedModal({ projectId, folderId }: { pro - 0 ? `파일 업로드 (${fileCount}) PreSigned` : '파일 업로드 PreSigned'} /> + 0 ? `파일 업로드 PreSigned (${fileCount})` : '파일 업로드 PreSigned'} />
카테고리
- - 직접 입력 - 파일로 입력 + + + 직접 입력 + + + 파일로 입력 +
@@ -192,7 +202,7 @@ export default function ProjectCreateForm({ onSubmit }: { onSubmit: (data: Proje
handleDrop(event, field.onChange)} onClick={() => fileInputRef.current?.click()} > -

- 파일을 업로드하려면 여기를 클릭하거나 파일을 드래그하여 여기에 놓으세요. -

+ {isDragging ? ( +

드래그한 파일을 여기에 놓으세요

+ ) : ( +

+ 파일을 업로드하려면 여기를 클릭하거나 +
+ 파일을 드래그하여 여기에 놓으세요. +

+ )} diff --git a/frontend/src/components/WorkspaceDropdownMenu/index.tsx b/frontend/src/components/WorkspaceDropdownMenu/index.tsx index d2c271d..999d22f 100644 --- a/frontend/src/components/WorkspaceDropdownMenu/index.tsx +++ b/frontend/src/components/WorkspaceDropdownMenu/index.tsx @@ -12,7 +12,7 @@ import ImageUploadFileForm from '../ImageUploadFileModal/ImageUploadFileForm'; import ImageUploadFolderFileForm from '../ImageUploadFolderFileModal/ImageUploadFolderFileForm'; import ImageUploadFolderForm from '../ImageUploadFolderModal/ImageUploadFolderForm'; import ImageUploadZipForm from '../ImageUploadZipModal/ImageUploadZipForm'; -import ImageUploadPresignedForm from '../ImageUploadPresignedModal/ImageUploadPresignedForm.tsx' +import ImageUploadPresignedForm from '../ImageUploadPresignedModal/ImageUploadPresignedForm.tsx'; export default function WorkspaceDropdownMenu({ projectId, @@ -25,9 +25,10 @@ export default function WorkspaceDropdownMenu({ }) { const [isOpenUploadFile, setIsOpenUploadFile] = React.useState(false); const [fileCount, setFileCount] = React.useState(0); + const [isOpenUploadPresigned, setIsOpenUploadPresigned] = React.useState(false); + const [presignedCount, setPresignedCount] = React.useState(0); const [isOpenUploadFolderFile, setIsOpenUploadFolderFile] = React.useState(false); const [isOpenUploadFolder, setIsOpenUploadFolder] = React.useState(false); - const [isOpenUploadPresigned, setIsOpenUploadPresigned] = React.useState(false); const [isOpenUploadZip, setIsOpenUploadZip] = React.useState(false); const handleOpenUploadFile = () => setIsOpenUploadFile(true); @@ -36,6 +37,20 @@ export default function WorkspaceDropdownMenu({ setIsOpenUploadFile(false); }; + const handleFileCount = (fileCount: number) => { + setFileCount(fileCount); + }; + + const handleOpenUploadPresigned = () => setIsOpenUploadPresigned(true); + + const handleCloseUploadPresigned = () => { + setIsOpenUploadPresigned(false); + }; + + const handlePresignedCount = (fileCount: number) => { + setPresignedCount(fileCount); + }; + const handleOpenUploadFolderFile = () => setIsOpenUploadFolderFile(true); const handleCloseUploadFolderFile = () => { @@ -48,22 +63,12 @@ export default function WorkspaceDropdownMenu({ setIsOpenUploadFolder(false); }; - const handleOpenUploadPresigned = () => setIsOpenUploadPresigned(true); - - const handleCloseUploadPresigned = () => { - setIsOpenUploadPresigned(false); - }; - const handleOpenUploadZip = () => setIsOpenUploadZip(true); const handleCloseUploadZip = () => { setIsOpenUploadZip(false); }; - const handleFileCount = (fileCount: number) => { - setFileCount(fileCount); - }; - return ( <> @@ -83,9 +88,9 @@ export default function WorkspaceDropdownMenu({ 파일 업로드 + 파일 업로드 (PresignedUrl 이용) 폴더 업로드 (파일 업로드 API 이용) 폴더 업로드 (백엔드 구현 필요) - 폴더 업로드 (PresignedUrl 이용) 폴더 압축파일 업로드 @@ -107,6 +112,25 @@ export default function WorkspaceDropdownMenu({ + + + + 0 ? `파일 업로드 PreSigned (${presignedCount})` : '파일 업로드 PreSigned'} + /> + + + + - - - - - - - -