Skip to content
Snippets Groups Projects
Commit 274a4075 authored by jsk22's avatar jsk22
Browse files

Issue #234/HOTFIX

parent 5fba3a63
No related branches found
No related tags found
1 merge request!307Issue #234/HOTFIX
Pipeline #42467 passed
...@@ -55,6 +55,12 @@ export default function EditCollectionModal({ open, onClose, collectionId, colle ...@@ -55,6 +55,12 @@ export default function EditCollectionModal({ open, onClose, collectionId, colle
const handleSubmit = async (e) => { const handleSubmit = async (e) => {
e.preventDefault(); e.preventDefault();
if (name.length > 150) {
alert("O nome não pode ultrapassar 150 caracteres.");
return;
}
const payload = { const payload = {
collection: { collection: {
name, name,
...@@ -132,7 +138,6 @@ export default function EditCollectionModal({ open, onClose, collectionId, colle ...@@ -132,7 +138,6 @@ export default function EditCollectionModal({ open, onClose, collectionId, colle
<div className="text-2xl font-bold text-darkGray-HC-white">Editar Coleção</div> <div className="text-2xl font-bold text-darkGray-HC-white">Editar Coleção</div>
<form onSubmit={(e) => { <form onSubmit={(e) => {
e.preventDefault(); e.preventDefault();
if (name.length > 150) return; // bloqueia envio
handleSubmit(); handleSubmit();
}} }}
className="flex flex-col flex-grow overflow-y-auto max-h-full" className="flex flex-col flex-grow overflow-y-auto max-h-full"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment