Skip to content

Commit

Permalink
Merge pull request #277 from msupply-foundation/274-add-telegram-link…
Browse files Browse the repository at this point in the history
…-to-docs

Update docs URL for telegram
  • Loading branch information
jmbrunskill authored Dec 6, 2023
2 parents 4d5709f + 4392c52 commit e49a295
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import {
Typography,
ToggleButton,
NotificationTypeNode,
EnvUtils,
ModalMode,
ButtonWithIcon,
TelegramIcon,
Box,
LoadingButton,
} from '@notify-frontend/common';
import { DraftRecipient } from './types';
import { ToggleButtonGroup } from '@mui/material';
import { ExternalURL } from 'packages/config/src';
import { useTelegramTestMessage } from '../../api/hooks/useTelegramTestMessage';

type RecipientEditFormProps = {
Expand All @@ -34,9 +31,7 @@ export const RecipientEditForm = ({
const { mutateAsync: sendTelegramTestMessage, isLoading: isMessageSending } =
useTelegramTestMessage();

const docsUrl = `${ExternalURL.PublicDocs}${
EnvUtils.mapRoute(location.pathname).docs
}`;
const coldchainTelegramDocs = `https://docs.msupply.foundation/coldchain/cold-chain-notifications/#setting-up-telegram-messenger`;

return (
<Grid flexDirection="column" display="flex" gap={2}>
Expand Down Expand Up @@ -86,7 +81,7 @@ export const RecipientEditForm = ({
</Typography>
<Typography sx={{ color: 'gray.dark' }}>
{t('text.telegram-recipient-creation-2')}{' '}
<a rel="noreferrer" target="_blank" href={docsUrl}>
<a rel="noreferrer" target="_blank" href={coldchainTelegramDocs}>
{t('text.here')}
</a>
{'.'}
Expand Down

0 comments on commit e49a295

Please sign in to comment.