Skip to content

Commit

Permalink
Fjernet CustomizedModal
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMartinKokseter committed Nov 14, 2023
1 parent 859de55 commit baf65f4
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions apps/frontend/src/components/krav/EditKrav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type EditKravProps = {

const maxInputWidth = '400px'
const inputMarginBottom = theme.sizing.scale900
const modalWidth = '1276px'

export const kravModal = () => document.querySelector('#krav-modal')

Expand Down Expand Up @@ -158,23 +159,12 @@ export const EditKrav = ({ krav, close, formRef, isOpen, setIsOpen, newVersion,

return (
<div>
<CustomizedModal
closeable={false}
onClose={() => {
if (isFormDirty) {
setIsAlertModalOpen(true)
} else {
setIsOpen(false)
}
}}
isOpen={isOpen}
overrides={{
Root: {
props: {
id: 'krav-modal',
},
},
}}
<Modal
width={modalWidth}
header={{
heading: newVersion ? 'Ny versjon' : newKrav ? 'Nytt krav' : 'Rediger kravside',
closeButton: false}}
open={isOpen}
>
<Formik
onSubmit={submit}
Expand Down Expand Up @@ -526,7 +516,7 @@ export const EditKrav = ({ krav, close, formRef, isOpen, setIsOpen, newVersion,
</Form>
)}
</Formik>
</CustomizedModal>
</Modal>
</div>
)
}
Expand Down

0 comments on commit baf65f4

Please sign in to comment.