Skip to content

Commit

Permalink
fix: use card in new as well as edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Oct 2, 2024
1 parent 1208729 commit e6e254a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/form/DefaultFormContents.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import i18n from '@dhis2/d2-i18n'
import { Card } from '@dhis2/ui'
import React from 'react'
import { useFormState } from 'react-final-form'
import { useNavigate } from 'react-router-dom'
import { getSectionPath } from '../../lib'
import { ModelSection } from '../../types'
import { StandardFormSection, StandardFormActions } from '../standardForm'
import { StandardFormActions, StandardFormSection } from '../standardForm'
import classes from './DefaultFormContents.module.css'
import { DefaultFormErrorNotice } from './DefaultFormErrorNotice'
import { Card } from '@dhis2/ui'

export function DefaultEditFormContents({
children,
Expand Down Expand Up @@ -60,7 +60,7 @@ export function DefaultNewFormContents({
const listPath = `/${getSectionPath(section)}`

return (
<div className={classes.form}>
<Card className={classes.form}>
{children}
<StandardFormSection>
<DefaultFormErrorNotice />
Expand All @@ -73,6 +73,6 @@ export function DefaultNewFormContents({
submitting={submitting}
onCancelClick={() => navigate(listPath)}
/>
</div>
</Card>
)
}

0 comments on commit e6e254a

Please sign in to comment.