Skip to content

Commit

Permalink
Resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
christabusho committed Jul 8, 2024
2 parents d816a80 + eff8536 commit f562f86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/editor/components/EditElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/app/editor/components/EditStage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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
</button>
Expand Down

0 comments on commit f562f86

Please sign in to comment.