feat: use dynamic DOCS URL
This commit is contained in:
@@ -2,13 +2,16 @@ import PropTypes from 'prop-types';
|
||||
import * as React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import { generateExternalLink } from '../../helpers/translationValues';
|
||||
import { WEBHOOK_DOCS } from '../../config/urls';
|
||||
import TextField from '../TextField';
|
||||
import { generateExternalLink } from 'helpers/translationValues';
|
||||
import { WEBHOOK_DOCS_PATH } from 'config/urls';
|
||||
import TextField from 'components/TextField';
|
||||
import useDocsUrl from 'hooks/useDocsUrl';
|
||||
import { Alert } from './style';
|
||||
|
||||
function WebhookUrlInfo(props) {
|
||||
const { webhookUrl, ...alertProps } = props;
|
||||
const webhookDocsUrl = useDocsUrl(WEBHOOK_DOCS_PATH);
|
||||
|
||||
return (
|
||||
<Alert icon={false} color="info" {...alertProps}>
|
||||
<Typography variant="body2" textAlign="center">
|
||||
@@ -28,7 +31,7 @@ function WebhookUrlInfo(props) {
|
||||
helperText={
|
||||
<FormattedMessage
|
||||
id="webhookUrlInfo.helperText"
|
||||
values={{ link: generateExternalLink(WEBHOOK_DOCS) }}
|
||||
values={{ link: generateExternalLink(webhookDocsUrl) }}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user