Skip to content

Commit 650638b

Browse files
committed
dont autoclose
1 parent 9943a14 commit 650638b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

apps/frontend/app/components/flows/AddExperiment/NewExperiment.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,6 @@ const NewExperiment = ({ formState, setFormState, copyID, setCopyId, ...rest })
128128
const [status, setStatus] = useState(0);
129129
const [id, setId] = useState(null);
130130

131-
const onDropComplete = () => {
132-
setFormState(-1);
133-
localStorage.removeItem('ID');
134-
setStatus(FormStates.Info);
135-
};
136-
137131
const [fileId, setFileId] = useState(null);
138132

139133
useLayoutEffect(() => {
@@ -209,7 +203,7 @@ const NewExperiment = ({ formState, setFormState, copyID, setCopyId, ...rest })
209203
) : status === FormStates.Confirmation ? (
210204
<ConfirmationStep form={form} />
211205
) : (
212-
<DispatchStep form={form} id={id} updateId={setFileId} onDropComplete={onDropComplete}/>
206+
<DispatchStep form={form} id={id} updateId={setFileId}/>
213207
)}
214208

215209
<div className='flex-shrink-0 border-t border-gray-200 px-4 py-5 sm:px-6'>

apps/frontend/app/components/flows/AddExperiment/stepComponents/DispatchStep.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const SUPPORTED_FILE_TYPES = {
1818
'application/x-elf': [], // does nothing atm, from what I can tell
1919
};
2020

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

@@ -50,7 +50,6 @@ export const DispatchStep = ({ id, form, updateId, onDropComplete, ...props }) =
5050
updateId(fileId);
5151
setSelectedFile(fileName);
5252
setLoading(false);
53-
onDropComplete();
5453
}
5554
else {
5655
const json = await uploadFileResponse.json();

0 commit comments

Comments
 (0)