diff --git a/src/app/editor/components/EditElement.tsx b/src/app/editor/components/EditElement.tsx index 7b7c667..a89b6bf 100644 --- a/src/app/editor/components/EditElement.tsx +++ b/src/app/editor/components/EditElement.tsx @@ -339,7 +339,7 @@ export function EditElement({ style={{ margin: '10px' }} onClick={saveEdits} disabled={ - watch('selectedOption') === 'Pick one' || watch('name') === '' // !isValid <- fix elementSchema + watch('selectedOption') === 'Pick one' || watch('name') === '' // || !isValid <------ commented out because of validation } > Save diff --git a/src/app/editor/components/EditStage.tsx b/src/app/editor/components/EditStage.tsx index ec1e42d..c4df7de 100644 --- a/src/app/editor/components/EditStage.tsx +++ b/src/app/editor/components/EditStage.tsx @@ -53,7 +53,11 @@ export function EditStage({ const updatedTreatment = JSON.parse(JSON.stringify(treatment)) // deep copy if (isValid) { console.log('Form is valid') +<<<<<<< HEAD if (stageIndex === undefined) { +======= + if (stageIndex === -1) { +>>>>>>> eff85369733f57f5aadef409cf3f3d36c5d2ec1d // create new stage updatedTreatment?.gameStages?.push({ name: watch('name'), @@ -142,7 +146,11 @@ export function EditStage({ className="btn btn-primary" style={{ margin: '10px' }} onClick={saveEdits} +<<<<<<< HEAD disabled={watch('duration') === 0 || watch('name') === '' || !isValid} +======= + disabled={watch('duration') === undefined || watch('name') === ''} +>>>>>>> eff85369733f57f5aadef409cf3f3d36c5d2ec1d > Save