Unverified Commit c6f71586 authored by KVOJJJin's avatar KVOJJJin Committed by GitHub

Fix: event listener of file dropping (#113)

parent b46511dd
...@@ -190,13 +190,15 @@ const FileUploader = ({ file, onFileUpdate }: IFileUploaderProps) => { ...@@ -190,13 +190,15 @@ const FileUploader = ({ file, onFileUpdate }: IFileUploaderProps) => {
onChange={fileChangeHandle} onChange={fileChangeHandle}
/> />
<div className={s.title}>{t('datasetCreation.stepOne.uploader.title')}</div> <div className={s.title}>{t('datasetCreation.stepOne.uploader.title')}</div>
{!currentFile && !file && ( <div ref={dropRef}>
<div ref={dropRef} className={cn(s.uploader, dragging && s.dragging)}> {!currentFile && !file && (
<span>{t('datasetCreation.stepOne.uploader.button')}</span> <div className={cn(s.uploader, dragging && s.dragging)}>
<label className={s.browse} onClick={selectHandle}>{t('datasetCreation.stepOne.uploader.browse')}</label> <span>{t('datasetCreation.stepOne.uploader.button')}</span>
{dragging && <div ref={dragRef} className={s.draggingCover}/>} <label className={s.browse} onClick={selectHandle}>{t('datasetCreation.stepOne.uploader.browse')}</label>
</div> {dragging && <div ref={dragRef} className={s.draggingCover}/>}
)} </div>
)}
</div>
{currentFile && ( {currentFile && (
<div className={cn(s.file, uploading && s.uploading)}> <div className={cn(s.file, uploading && s.uploading)}>
{uploading && ( {uploading && (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment