From c4d50293ffa80d1b4cc39cb6d7002e187a0a9b33 Mon Sep 17 00:00:00 2001 From: enes Date: Mon, 7 Oct 2024 12:53:43 +0200 Subject: [PATCH 1/2] refactor: toolbox order --- src/utils/mark.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/mark.ts b/src/utils/mark.ts index 0f437c4..b77818a 100644 --- a/src/utils/mark.ts +++ b/src/utils/mark.ts @@ -153,6 +153,11 @@ const findOtherUserMarks = (marks: Mark[], pubkey: string): Mark[] => { } export const DEFAULT_TOOLBOX: DrawTool[] = [ + { + identifier: MarkType.TEXT, + icon: faT, + label: 'Text' + }, { identifier: MarkType.FULLNAME, icon: faIdCard, @@ -177,11 +182,6 @@ export const DEFAULT_TOOLBOX: DrawTool[] = [ label: 'Date Time', isComingSoon: true }, - { - identifier: MarkType.TEXT, - icon: faT, - label: 'Text' - }, { identifier: MarkType.NUMBER, icon: fa1, -- 2.34.1 From 2d7bb234f417daf2a3a4066b1680666bdc07d57b Mon Sep 17 00:00:00 2001 From: enes Date: Mon, 7 Oct 2024 12:59:55 +0200 Subject: [PATCH 2/2] refactor: next on each mark, including the final one --- src/components/MarkFormField/index.tsx | 6 +++--- src/utils/const.ts | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/MarkFormField/index.tsx b/src/components/MarkFormField/index.tsx index e1003a0..02f34cc 100644 --- a/src/components/MarkFormField/index.tsx +++ b/src/components/MarkFormField/index.tsx @@ -1,7 +1,7 @@ import { CurrentUserMark } from '../../types/mark.ts' import styles from './style.module.scss' -import { MARK_TYPE_TRANSLATION, NEXT, SIGN } from '../../utils/const.ts' +import { MARK_TYPE_TRANSLATION } from '../../utils/const.ts' import { findNextIncompleteCurrentUserMark, isCurrentUserMarksComplete, @@ -32,7 +32,6 @@ const MarkFormField = ({ handleCurrentUserMarkChange }: MarkFormFieldProps) => { const [displayActions, setDisplayActions] = useState(true) - const getSubmitButtonText = () => (isReadyToSign() ? SIGN : NEXT) const isReadyToSign = () => isCurrentUserMarksComplete(currentUserMarks) || isCurrentValueLast(currentUserMarks, selectedMark, selectedMarkValue) @@ -61,6 +60,7 @@ const MarkFormField = ({ onClick={toggleActions} className={styles.triggerBtn} type="button" + title="Toggle" >
diff --git a/src/utils/const.ts b/src/utils/const.ts index a512c2f..8e53a46 100644 --- a/src/utils/const.ts +++ b/src/utils/const.ts @@ -4,8 +4,6 @@ export const EMPTY: string = '' export const MARK_TYPE_TRANSLATION: { [key: string]: string } = { [MarkType.FULLNAME.valueOf()]: 'Full Name' } -export const SIGN: string = 'Sign' -export const NEXT: string = 'Next' export const ARRAY_BUFFER = 'arraybuffer' export const DEFLATE = 'DEFLATE' -- 2.34.1