useValidateMessageWithSignature
- Description
- Params and Return
- Example
Hook to validate message that could have a signature
Param / Return | Description |
---|---|
param | message: the message to be validated |
returns | boolean if the message is valid |
How to use the useValidateMessageWithSignature component
const validateMessage = useValidateMessageWithSignature()
useEffect(() => {
navigation.setOptions({
headerLeft: (props): ReactNode => (
<BackButton
onPress={validateMessage(messageReply) ? goToCancel : navigation.goBack}
canGoBack={props.canGoBack}
label={BackButtonLabelConstants.cancel}
showCarat={false}
/>
),
headerRight: () => (
<SaveButton
onSave={() => {
setOnSaveDraftClicked(true)
setOnSendClicked(true)
}}
disabled={false}
a11yHint={t('secureMessaging.saveDraft.a11yHint')}
/>
),
})
})