From 26352bf24edb96130f81ea498cecfbdf1afd3419 Mon Sep 17 00:00:00 2001 From: fsimonjetz Date: Mon, 6 May 2024 13:02:45 +0000 Subject: [PATCH] Revert "add a discard button" This reverts commit 0079afa0d47e6657b79a2f59c49b58794fa6f8bd. --- .../ui/fragment/ArchaeologyEditor.sass | 2 -- .../ui/fragment/ArchaeologyEditor.tsx | 17 +---------------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 src/fragmentarium/ui/fragment/ArchaeologyEditor.sass diff --git a/src/fragmentarium/ui/fragment/ArchaeologyEditor.sass b/src/fragmentarium/ui/fragment/ArchaeologyEditor.sass deleted file mode 100644 index 02646cf43..000000000 --- a/src/fragmentarium/ui/fragment/ArchaeologyEditor.sass +++ /dev/null @@ -1,2 +0,0 @@ -.submit-button - margin-left: 0.5rem diff --git a/src/fragmentarium/ui/fragment/ArchaeologyEditor.tsx b/src/fragmentarium/ui/fragment/ArchaeologyEditor.tsx index 869f85b86..8293bae4b 100644 --- a/src/fragmentarium/ui/fragment/ArchaeologyEditor.tsx +++ b/src/fragmentarium/ui/fragment/ArchaeologyEditor.tsx @@ -12,7 +12,6 @@ import { ArchaeologyDto } from 'fragmentarium/domain/archaeologyDtos' import { Fragment } from 'fragmentarium/domain/fragment' import withData from 'http/withData' import { FindspotService } from 'fragmentarium/application/FindspotService' -import './ArchaeologyEditor.sass' interface Props { archaeology?: Archaeology @@ -48,7 +47,7 @@ interface FindspotOption { class ArchaeologyEditor extends Component { private isDirty = false - private originalState: Readonly + private originalState: State private updateArchaeology: (archaeology: ArchaeologyDto) => Promise private findspotsById: ReadonlyMap private findspots: readonly Findspot[] @@ -137,12 +136,6 @@ class ArchaeologyEditor extends Component { } } - reset = (event: React.MouseEvent): void => { - this.isDirty = false - this.setState(this.originalState) - event.currentTarget.blur() - } - submit = (event: FormEvent): void => { event.preventDefault() @@ -230,18 +223,10 @@ class ArchaeologyEditor extends Component { {this.renderExcavationSiteForm()} {this.renderIsRegularExcavationForm()} {this.renderFindspotForm()} -