fix: market selected no longer available - add link to all markets (#2748)

This commit is contained in:
m.ray 2023-01-26 08:46:44 -05:00 committed by GitHub
parent 5766d84804
commit 860938f26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 4 deletions

View File

@ -7,7 +7,7 @@ import {
useDataProvider, useDataProvider,
useThrottledDataProvider, useThrottledDataProvider,
} from '@vegaprotocol/react-helpers'; } from '@vegaprotocol/react-helpers';
import { AsyncRenderer, Splash } from '@vegaprotocol/ui-toolkit'; import { AsyncRenderer, ExternalLink, Splash } from '@vegaprotocol/ui-toolkit';
import type { import type {
SingleMarketFieldsFragment, SingleMarketFieldsFragment,
MarketData, MarketData,
@ -113,7 +113,17 @@ export const MarketPage = () => {
if (!data && marketId) { if (!data && marketId) {
return ( return (
<Splash> <Splash>
<p>{t('Market not found')}</p> <span className="flex flex-col items-center gap-2">
<p className="text-sm justify-center">
{t('This market URL is not available anymore.')}
</p>
<p className="text-sm justify-center">
{t(`Please choose another market from the`)}{' '}
<ExternalLink onClick={() => navigate(Links[Routes.MARKETS]())}>
market list
</ExternalLink>
</p>
</span>
</Splash> </Splash>
); );
} }

View File

@ -84,7 +84,7 @@ export const SelectMarketLandingTable = ({
data-testid="view-market-list-link" data-testid="view-market-list-link"
onClick={() => onClose()} onClick={() => onClose()}
> >
<UILink className="uppercase underline"> <UILink className="text-sm underline">
{'Or view full market list'} {'Or view full market list'}
</UILink> </UILink>
</Link> </Link>

View File

@ -120,7 +120,7 @@ export const Toast = ({
onClick={closeToast} onClick={closeToast}
className="absolute p-2 top-0 right-0" className="absolute p-2 top-0 right-0"
> >
<Icon name="cross" size={3} className="!block" /> <Icon name="cross" size={3} className="!block dark:text-white" />
</button> </button>
<div <div
className={classNames(getToastAccent(intent), 'p-2 pt-3 text-center')} className={classNames(getToastAccent(intent), 'p-2 pt-3 text-center')}