mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-05 09:17:39 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be5b1b87f9 |
@@ -694,17 +694,20 @@ function WidgetsValueModal(props) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isTab === "type") {
|
if (isTab === "type") {
|
||||||
|
//trim user name or typed name value to show in initial signature
|
||||||
const trimmedName = typedSignature
|
const trimmedName = typedSignature
|
||||||
? typedSignature?.trim()
|
? typedSignature?.trim()
|
||||||
: currentUserName?.trim();
|
: currentUserName?.trim();
|
||||||
|
//get full name of user
|
||||||
|
const fullUserName = typedSignature || currentUserName
|
||||||
const firstCharacter = trimmedName?.charAt(0);
|
const firstCharacter = trimmedName?.charAt(0);
|
||||||
const userName =
|
const userName =
|
||||||
currWidgetsDetails?.type === "initials"
|
currWidgetsDetails?.type === "initials"
|
||||||
? firstCharacter
|
? firstCharacter
|
||||||
: typedSignature;
|
: fullUserName;
|
||||||
const signatureValue = currWidgetsDetails?.typeSignature;
|
const signatureValue = currWidgetsDetails?.typeSignature;
|
||||||
setTypedSignature(signatureValue || userName || "");
|
setTypedSignature(signatureValue || userName || "");
|
||||||
convertToImg(fontSelect, userName);
|
convertToImg(fontSelect, signatureValue || userName || "");
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [isTab]);
|
}, [isTab]);
|
||||||
|
|||||||
Reference in New Issue
Block a user