Skip to content

Commit f0cb711

Browse files
committed
updated comments
1 parent 95c2792 commit f0cb711

File tree

1 file changed

+0
-8
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/form

1 file changed

+0
-8
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/form/form.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,13 @@ export function FormDeploy({
137137
)
138138
}
139139
} else if (!isLoading) {
140-
// Set default title for new forms
141140
const workflowName =
142141
useWorkflowStore.getState().blocks[Object.keys(useWorkflowStore.getState().blocks)[0]]
143142
?.name || 'Form'
144143
setTitle(`${workflowName} Form`)
145144
}
146145
}, [existingForm, isLoading])
147146

148-
// Get input fields from start block and initialize field configs
149147
useEffect(() => {
150148
const blocks = Object.values(useWorkflowStore.getState().blocks)
151149
const startBlock = blocks.find((b) => b.type === 'starter' || b.type === 'start_trigger')
@@ -155,7 +153,6 @@ export function FormDeploy({
155153
if (inputFormat && Array.isArray(inputFormat)) {
156154
setInputFields(inputFormat)
157155

158-
// Initialize field configs if not already set
159156
if (fieldConfigs.length === 0) {
160157
setFieldConfigs(
161158
inputFormat.map((f: { name: string; type?: string }) => ({
@@ -175,7 +172,6 @@ export function FormDeploy({
175172

176173
const allowedEmails = emailItems.filter((item) => item.isValid).map((item) => item.value)
177174

178-
// Validate form
179175
useEffect(() => {
180176
const isValid =
181177
inputFields.length > 0 &&
@@ -206,7 +202,6 @@ export function FormDeploy({
206202
e.preventDefault()
207203
setErrors({})
208204

209-
// Validate before submit
210205
if (!isIdentifierValid && identifier !== existingForm?.identifier) {
211206
setError('identifier', 'Please wait for identifier validation to complete')
212207
return
@@ -261,7 +256,6 @@ export function FormDeploy({
261256

262257
if (result?.formUrl) {
263258
setFormUrl(result.formUrl)
264-
// Open the form in a new window after successful deployment
265259
window.open(result.formUrl, '_blank', 'noopener,noreferrer')
266260
}
267261
}
@@ -275,7 +269,6 @@ export function FormDeploy({
275269
const message = err instanceof Error ? err.message : 'An error occurred'
276270
logger.error('Error deploying form:', err)
277271

278-
// Parse error message and show inline
279272
if (message.toLowerCase().includes('identifier')) {
280273
setError('identifier', message)
281274
} else if (message.toLowerCase().includes('password')) {
@@ -314,7 +307,6 @@ export function FormDeploy({
314307
formId: existingForm.id,
315308
workflowId,
316309
})
317-
// Reset form fields after successful deletion
318310
setIdentifier('')
319311
setTitle('')
320312
setDescription('')

0 commit comments

Comments
 (0)