From 069bdd65cdbe7e5f0464bcc4d85112bd603304f2 Mon Sep 17 00:00:00 2001 From: Vadym Shevchenko Date: Fri, 30 Aug 2024 12:20:58 +0300 Subject: [PATCH 1/4] Added external verification of messages by link --- .../sections/Signatures/MessageContent.tsx | 32 +++++++++++++++++-- components/sections/Signatures/SigTab.tsx | 6 ++-- i18n.js | 1 + pages/signatures.tsx | 2 +- pages/signatures/[data].tsx | 30 +++++++++++++++++ 5 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 pages/signatures/[data].tsx diff --git a/components/sections/Signatures/MessageContent.tsx b/components/sections/Signatures/MessageContent.tsx index 9e57fbd..f4beda5 100644 --- a/components/sections/Signatures/MessageContent.tsx +++ b/components/sections/Signatures/MessageContent.tsx @@ -11,13 +11,14 @@ interface IMessageContent { signature: string } -const MessageContent = () => { +const MessageContent = ({iMessageContent}) => { const { t } = useTranslation('signatures') const methods = useForm({ mode: 'onBlur' }) const [verusSignature, setVerusSignature] = useState | null>(null) + const [filledVerusSignature, setFilledVerusSignature] = useState(iMessageContent.filled) const [sigResult, setSigResult] = useState() const onSubmit: SubmitHandler = async (values) => { @@ -52,12 +53,13 @@ const MessageContent = () => { const _handleReset = () => { setVerusSignature(null) + setFilledVerusSignature(false) setSigResult(null) methods.reset() } return ( <> - {!verusSignature && ( + {!verusSignature && !filledVerusSignature && (
@@ -80,6 +82,32 @@ const MessageContent = () => { )} + {!verusSignature && filledVerusSignature && ( + + + +