fix(support-url): Hide contact support button when SUPPORT_URL is empty
- fix issue on error notification on invite contacts
This commit is contained in:
parent
6f9944a2d0
commit
17f77a4246
|
@ -511,11 +511,7 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
|
||||||
const supportString = t('inlineDialogFailure.supportMsg');
|
const supportString = t('inlineDialogFailure.supportMsg');
|
||||||
const supportLink = interfaceConfig.SUPPORT_URL;
|
const supportLink = interfaceConfig.SUPPORT_URL;
|
||||||
|
|
||||||
if (!supportLink) {
|
const supportLinkContent = supportLink ? (
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const supportLinkContent = (
|
|
||||||
<span>
|
<span>
|
||||||
<span>
|
<span>
|
||||||
{ supportString.padEnd(supportString.length + 1) }
|
{ supportString.padEnd(supportString.length + 1) }
|
||||||
|
@ -524,13 +520,14 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
|
||||||
<a
|
<a
|
||||||
aria-label = { supportLink }
|
aria-label = { supportLink }
|
||||||
href = { supportLink }
|
href = { supportLink }
|
||||||
rel = 'noopener noreferrer'>
|
rel = 'noopener noreferrer'
|
||||||
|
target = '_blank'>
|
||||||
{ t('inlineDialogFailure.support') }
|
{ t('inlineDialogFailure.support') }
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span>.</span>
|
<span>.</span>
|
||||||
</span>
|
</span>
|
||||||
);
|
) : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className = 'modal-dialog-form-error'>
|
<div className = 'modal-dialog-form-error'>
|
||||||
|
|
|
@ -116,7 +116,7 @@ class Notification extends AbstractNotification<Props> {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!hideErrorSupportLink) {
|
if (!hideErrorSupportLink && interfaceConfig.SUPPORT_URL) {
|
||||||
buttons.push({
|
buttons.push({
|
||||||
content: this.props.t('dialog.contactSupport'),
|
content: this.props.t('dialog.contactSupport'),
|
||||||
onClick: this._onOpenSupportLink
|
onClick: this._onOpenSupportLink
|
||||||
|
|
Loading…
Reference in New Issue