From 39934f59c375d774f1fb4f7a97676304f5e9fd41 Mon Sep 17 00:00:00 2001 From: enes Date: Thu, 19 Sep 2024 11:46:34 +0200 Subject: [PATCH] fix: last signer as default next --- src/components/DrawPDFFields/index.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/DrawPDFFields/index.tsx b/src/components/DrawPDFFields/index.tsx index aa6b0e5..194291f 100644 --- a/src/components/DrawPDFFields/index.tsx +++ b/src/components/DrawPDFFields/index.tsx @@ -39,6 +39,7 @@ export const DrawPDFFields = (props: Props) => { const { selectedFiles, selectedTool, onDrawFieldsChange, users } = props const signers = users.filter((u) => u.role === UserRole.signer) const defaultSignerNpub = signers.length ? hexToNpub(signers[0].pubkey) : '' + const [lastSigner, setLastSigner] = useState(defaultSignerNpub) const { to, from } = useScale() const [sigitFiles, setSigitFiles] = useState([]) @@ -117,7 +118,7 @@ export const DrawPDFFields = (props: Props) => { top: to(page.width, y), width: event.pointerType === 'mouse' ? 0 : DEFAULT_START_SIZE.width, height: event.pointerType === 'mouse' ? 0 : DEFAULT_START_SIZE.height, - counterpart: defaultSignerNpub, + counterpart: lastSigner, type: selectedTool.identifier } @@ -456,10 +457,14 @@ export const DrawPDFFields = (props: Props) => { Counterpart