fix: cant submit report while uploading

This commit is contained in:
Barf-Vader
2025-06-10 18:30:09 +01:00
parent d982bf550e
commit 4d8cffc726

View File

@@ -15,7 +15,7 @@
});
async function uploadReport() {
const { data: studySpaceInsert, error: reportUploadError } = await supabase
const { error: reportUploadError } = await supabase
.from("reports")
.insert(reportData)
.select()
@@ -53,8 +53,9 @@
rows={2}
bind:value={reportData.content}
/>
<button disabled={!reportData.type || reportData.content?.length === 0} class="submit"
>Submit</button
<button
disabled={!reportData.type || reportData.content?.length === 0 || uploading}
class="submit">Submit</button
>
<button type="button" class="exit" aria-label="exit" onclick={hideFunc}
><img src={crossUrl} alt="exit" /></button