Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
umer4ik authored Nov 16, 2023
1 parent c9492cc commit c164adf
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions ui/src/routes/incarnations/EditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ import { IncarnationsForm } from './Form'
import { Section } from './parts'
import { Incarnation } from '../../interfaces/incarnations.types'

const toIncarnationInput = (x: Incarnation): IncarnationInput => {
const templateData = JSON.stringify(x.templateData, null, 2)
return {
automerge: true,
repository: x.incarnationRepository,
targetDirectory: x.targetDirectory,
templateRepository: x.templateRepository ?? '',
templateVersion: x.templateRepositoryVersion ?? '',
templateData
}
}
const toIncarnationInput = (x: Incarnation): IncarnationInput => ({
automerge: true,
repository: x.incarnationRepository,
targetDirectory: x.targetDirectory,
templateRepository: x.templateRepository ?? '',
templateVersion: x.templateRepositoryVersion ?? '',
templateData: JSON.stringify(x.templateData, null, 2)
})

export const EditIncarnationForm = () => {
const { id } = useParams()
Expand Down

0 comments on commit c164adf

Please sign in to comment.