Skip to content

Commit

Permalink
dont autoclose
Browse files Browse the repository at this point in the history
  • Loading branch information
rhit-windsors committed Nov 18, 2024
1 parent 9943a14 commit 650638b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ const NewExperiment = ({ formState, setFormState, copyID, setCopyId, ...rest })
const [status, setStatus] = useState(0);
const [id, setId] = useState(null);

const onDropComplete = () => {
setFormState(-1);
localStorage.removeItem('ID');
setStatus(FormStates.Info);
};

const [fileId, setFileId] = useState(null);

useLayoutEffect(() => {
Expand Down Expand Up @@ -209,7 +203,7 @@ const NewExperiment = ({ formState, setFormState, copyID, setCopyId, ...rest })
) : status === FormStates.Confirmation ? (
<ConfirmationStep form={form} />
) : (
<DispatchStep form={form} id={id} updateId={setFileId} onDropComplete={onDropComplete}/>
<DispatchStep form={form} id={id} updateId={setFileId}/>
)}

<div className='flex-shrink-0 border-t border-gray-200 px-4 py-5 sm:px-6'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const SUPPORTED_FILE_TYPES = {
'application/x-elf': [], // does nothing atm, from what I can tell
};

export const DispatchStep = ({ id, form, updateId, onDropComplete, ...props }) => {
export const DispatchStep = ({ id, form, updateId, ...props }) => {
const { data: session } = useSession();
const [loading, setLoading] = useState<boolean>(false);

Expand Down Expand Up @@ -50,7 +50,6 @@ export const DispatchStep = ({ id, form, updateId, onDropComplete, ...props }) =
updateId(fileId);
setSelectedFile(fileName);
setLoading(false);
onDropComplete();
}
else {
const json = await uploadFileResponse.json();
Expand Down

0 comments on commit 650638b

Please sign in to comment.