Skip to content

Commit

Permalink
Merge pull request #491 from Cryptonomic/feature/478-server-status-al…
Browse files Browse the repository at this point in the history
…ert-link

added some error links
  • Loading branch information
vgaudis authored Jun 1, 2022
2 parents 15e47cf + 94fc415 commit 26c8af9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/components/NodesStatus/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled from 'styled-components';
import { Trans, useTranslation } from 'react-i18next';
import { ms } from '../../styles/helpers';
import TezosIcon from '../TezosIcon/';
import { openLink } from '../../utils/general';

const Container = styled.div`
display: flex;
Expand Down Expand Up @@ -44,12 +45,15 @@ interface Props {
message: string;
}

const NetworkErrorLink = 'https://cryptonomic.zendesk.com/hc/en-us/articles/6587794089101';
const ConseilErrorLink = 'https://cryptonomic.zendesk.com/hc/en-us/articles/6587884720653';

const NodesStatus = (props: Props) => {
const { message } = props;
const { t } = useTranslation();

function goTo() {
console.log('goto');
function goTo(link) {
openLink(link);
}

function onGetNodeStatus(msg) {
Expand All @@ -58,7 +62,7 @@ const NodesStatus = (props: Props) => {
<Trans i18nKey="nodes.errors.tezos_node">
<MediumText>We’re currently experiencing network issues.</MediumText>
Your assets are safe but you may not be able to complete new transactions.
<Link onClick={() => goTo()}> Learn more </Link>
<Link onClick={() => goTo(NetworkErrorLink)}> Learn more </Link>
</Trans>
);
}
Expand All @@ -67,7 +71,7 @@ const NodesStatus = (props: Props) => {
<Trans i18nKey="nodes.errors.not_synced">
<MediumText>We’re currently experiencing network issues.</MediumText>
Your assets are safe but you may not be able to see an updated transaction history. Please check back later while we work on a fix.
<Link onClick={() => goTo()}> Learn more </Link>
<Link onClick={() => goTo(ConseilErrorLink)}> Learn more </Link>
</Trans>
);
}
Expand Down

0 comments on commit 26c8af9

Please sign in to comment.