diff --git a/apps/trading/client-pages/referrals/create-code-form.tsx b/apps/trading/client-pages/referrals/create-code-form.tsx
index 73123e3be..9e14a8bc0 100644
--- a/apps/trading/client-pages/referrals/create-code-form.tsx
+++ b/apps/trading/client-pages/referrals/create-code-form.tsx
@@ -95,6 +95,11 @@ const CreateCodeDialog = ({
const { stakeAvailable: currentStakeAvailable, requiredStake } =
useStakeAvailable();
+ const { data: referralSets } = useReferral({
+ pubKey,
+ role: 'referrer',
+ });
+
const onSubmit = () => {
if (isReadOnly || !pubKey) {
setErr('Not connected');
@@ -193,6 +198,68 @@ const CreateCodeDialog = ({
);
}
+ if (!referralSets) {
+ return (
+
+ {(status === 'idle' || status === 'loading' || status === 'error') && (
+ <>
+ {
+
+ {t(
+ 'There is currently no referral program active, are you sure you want to create a code?'
+ )}
+
+ }
+ >
+ )}
+ {status === 'success' && code && (
+
+
+
+ }
+ >
+ {t('Copy')}
+
+
+
+ )}
+
onSubmit()}
+ {...getButtonProps()}
+ >
+ {status === 'idle' && (
+
{
+ refetch();
+ setDialogOpen(false);
+ }}
+ >
+ {t('No')}
+
+ )}
+ {err &&
{err}}
+
+
+ {t('About the referral program')}
+
+
+ {t('Disclaimer')}
+
+
+
+ );
+ }
+
return (
{(status === 'idle' || status === 'loading' || status === 'error') && (
diff --git a/apps/trading/client-pages/referrals/tiers.tsx b/apps/trading/client-pages/referrals/tiers.tsx
index cd604cd68..113137ccd 100644
--- a/apps/trading/client-pages/referrals/tiers.tsx
+++ b/apps/trading/client-pages/referrals/tiers.tsx
@@ -6,7 +6,12 @@ import { BORDER_COLOR, GRADIENT } from './constants';
import { Tag } from './tag';
import type { ComponentProps, ReactNode } from 'react';
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
-import { DApp, TOKEN_PROPOSALS, useLinks } from '@vegaprotocol/environment';
+import {
+ DApp,
+ DocsLinks,
+ TOKEN_PROPOSALS,
+ useLinks,
+} from '@vegaprotocol/environment';
import { useT, ns } from '../../lib/use-t';
import { Trans } from 'react-i18next';
@@ -88,10 +93,19 @@ export const TiersContainer = () => {
return (
- {t('here')}
+ {t('Governance App')}
+ ,
+ ]}
+ ns={ns}
+ />
+
+ {t('Docs')}
,
]}
ns={ns}
diff --git a/libs/environment/src/hooks/use-links.ts b/libs/environment/src/hooks/use-links.ts
index 2275cb8b6..078aea623 100644
--- a/libs/environment/src/hooks/use-links.ts
+++ b/libs/environment/src/hooks/use-links.ts
@@ -85,6 +85,7 @@ export const DocsLinks = VEGA_DOCS_URL
ICEBERG_ORDERS: `${VEGA_DOCS_URL}/concepts/trading-on-vega/orders#iceberg-order`,
POST_REDUCE_ONLY: `${VEGA_DOCS_URL}/concepts/trading-on-vega/orders#conditional-order-parameters`,
QUANTUM: `${VEGA_DOCS_URL}/concepts/assets/asset-framework#quantum`,
+ REFERRALS: `${VEGA_DOCS_URL}/tutorials/proposals/referral-program-proposal`,
}
: undefined;