Skip to content

Commit

Permalink
fix(website): don't open file picker twice (#1973)
Browse files Browse the repository at this point in the history
File picker opened twice since c29b912

Bug noticed by @theosanderson

I can't figure out how to add a playwright test for this

So we will have to look out for it manually

See: https://loculus.slack.com/archives/C05G172HL6L/p1716246834623479
  • Loading branch information
corneliusroemer authored May 21, 2024
1 parent 2ff5907 commit 9781881
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion website/src/components/Submission/DataUploadForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,14 @@ const UploadComponent = ({
<Icon className='mx-auto h-12 w-12 text-gray-300' aria-hidden='true' />
<div className='mt-4 text-sm leading-6 text-gray-600'>
<label className='inline relative cursor-pointer rounded-md bg-white font-semibold text-primary-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-600 focus-within:ring-offset-2 hover:text-primary-500'>
<span onClick={handleUpload}>Upload a file </span>
<span
onClick={(e) => {
e.preventDefault();
handleUpload();
}}
>
Upload a file
</span>
{isClient && (
<input
id={name}
Expand Down

0 comments on commit 9781881

Please sign in to comment.