fix(setup): make SMTP optional and adjust setup check
This commit is contained in:
@@ -44,14 +44,13 @@ export function SetupWizard() {
|
||||
adminForm.firstName.trim().length > 0 &&
|
||||
adminForm.lastName.trim().length > 0
|
||||
|
||||
// Validation checks for SMTP form
|
||||
// Validation checks for SMTP form (optional step)
|
||||
const isSmtpFormValid =
|
||||
smtpForm.host.trim().length > 0 &&
|
||||
!isNaN(Number(smtpForm.port)) &&
|
||||
smtpForm.user.trim().length > 0
|
||||
smtpForm.host.trim().length === 0 ||
|
||||
(!isNaN(Number(smtpForm.port)) && smtpForm.user.trim().length > 0)
|
||||
|
||||
const handleFinishSetup = async () => {
|
||||
if (!isAdminFormValid || !isSmtpFormValid) return
|
||||
if (!isAdminFormValid) return
|
||||
setLoading(true)
|
||||
setErrorMsg('')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user