Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying error message whne uploading a solution in format other than pdf #469

Merged
merged 1 commit into from
Nov 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/components/Problems/UploadProblemForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
invalidateSeriesQuery()
alert('Riešenie úspešne nahrané.')
} else {
console.warn(response)

Check warning on line 39 in src/components/Problems/UploadProblemForm.tsx

View workflow job for this annotation

GitHub Actions / branch-test

Unexpected console statement
alert(
'Niečo sa ASI pokazilo, skontroluj, či bolo riešenie nahrané, a ak si technický typ, môžeš pozrieť chybu v konzole.',
)
Expand Down Expand Up @@ -132,6 +132,7 @@
</Typography>
</>
)}
{fileRejections.length > 0 && <span>Nahraný súbor musí byť vo formáte pdf.</span>}
{files?.name && (
<div className={styles.files}>
<div>
Expand All @@ -149,8 +150,6 @@
Zrušiť
</Button>
</div>

{fileRejections.length > 0 && <span>Nahraný súbor musí byť vo formáte pdf.</span>}
</div>
)}
</div>
Expand Down
Loading