allow signing and show PdfView without any marks (never created) #287
@ -101,8 +101,7 @@ const PdfMarking = (props: PdfMarkingProps) => {
|
||||
*/
|
||||
const handleSubmit = (event: React.MouseEvent<HTMLButtonElement>) => {
|
||||
event.preventDefault()
|
||||
if (!selectedMarkValue || !selectedMark) return
|
||||
|
||||
if (selectedMarkValue && selectedMark) {
|
||||
const updatedMark: CurrentUserMark = getUpdatedMark(
|
||||
selectedMark,
|
||||
selectedMarkValue
|
||||
@ -116,6 +115,8 @@ const PdfMarking = (props: PdfMarkingProps) => {
|
||||
setCurrentUserMarks(updatedCurrentUserMarks)
|
||||
setSelectedMark(null)
|
||||
setUpdatedMarks(updatedMark.mark)
|
||||
}
|
||||
|
||||
handleSign()
|
||||
}
|
||||
|
||||
@ -162,7 +163,6 @@ const PdfMarking = (props: PdfMarkingProps) => {
|
||||
otherUserMarks={otherUserMarks}
|
||||
/>
|
||||
</StickySideColumns>
|
||||
{selectedMark !== null && (
|
||||
<MarkFormField
|
||||
handleSubmit={handleSubmit}
|
||||
handleSelectedMarkValueChange={handleChange}
|
||||
@ -171,7 +171,6 @@ const PdfMarking = (props: PdfMarkingProps) => {
|
||||
currentUserMarks={currentUserMarks}
|
||||
handleCurrentUserMarkChange={handleCurrentUserMarkChange}
|
||||
/>
|
||||
)}
|
||||
</Container>
|
||||
</>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user