fix: add send email content length limits
This commit is contained in:
@@ -45,13 +45,17 @@ export function SendEmailModal({
|
||||
toast.error("No email address selected");
|
||||
return;
|
||||
}
|
||||
console.log("sendForm", sendForm);
|
||||
// return;
|
||||
|
||||
if (!sendForm.to || !sendForm.subject || !sendForm.html) {
|
||||
toast.error("Please fill in all required fields");
|
||||
return;
|
||||
}
|
||||
|
||||
if (sendForm.text.trim().length < 10) {
|
||||
toast.error("Email content must be at least 10 characters");
|
||||
return;
|
||||
}
|
||||
|
||||
startTransition(async () => {
|
||||
try {
|
||||
const response = await fetch("/api/email/send", {
|
||||
|
||||
102
public/sw.js
102
public/sw.js
File diff suppressed because one or more lines are too long
2456
public/workbox-8817a5e5.js
Normal file
2456
public/workbox-8817a5e5.js
Normal file
File diff suppressed because it is too large
Load Diff
1
public/workbox-8817a5e5.js.map
Normal file
1
public/workbox-8817a5e5.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user