Skip to content
Snippets Groups Projects
Commit 319ab718 authored by Ramon Souza's avatar Ramon Souza
Browse files

stats help url check + text center on connection modal

parent e0db693f
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,8 @@ class ConnectionStatusComponent extends PureComponent {
intl,
} = this.props;
const isValidUrl = new RegExp(/^(http|https):\/\/[^ "]+$/).test(STATS.help);
return (
<Modal
overlayClassName={styles.overlay}
......@@ -138,9 +140,13 @@ class ConnectionStatusComponent extends PureComponent {
</div>
<div className={styles.description}>
{intl.formatMessage(intlMessages.description)}{' '}
<a href={STATS.help} target="_blank" rel="noopener noreferrer">
{`(${intl.formatMessage(intlMessages.more)})`}
</a>
{isValidUrl
&& (
<a href={STATS.help} target="_blank" rel="noopener noreferrer">
{`(${intl.formatMessage(intlMessages.more)})`}
</a>
)
}
</div>
<div className={styles.content}>
<div className={styles.wrapper}>
......
......@@ -93,6 +93,7 @@
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
.text {
padding-left: .5rem;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment