chore(trading): competitions texts (#5826)
This commit is contained in:
parent
48d6be0adf
commit
f556247e1a
@ -1,7 +1,12 @@
|
||||
import { useT } from '../../lib/use-t';
|
||||
import { ErrorBoundary } from '@sentry/react';
|
||||
import { CompetitionsHeader } from '../../components/competitions/competitions-header';
|
||||
import { Intent, Loader, TradingButton } from '@vegaprotocol/ui-toolkit';
|
||||
import {
|
||||
ExternalLink,
|
||||
Intent,
|
||||
Loader,
|
||||
TradingButton,
|
||||
} from '@vegaprotocol/ui-toolkit';
|
||||
import { useEpochInfoQuery } from '../../lib/hooks/__generated__/Epoch';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { Links } from '../../lib/links';
|
||||
@ -17,6 +22,8 @@ import { usePageTitle } from '../../lib/hooks/use-page-title';
|
||||
import { TeamCard } from '../../components/competitions/team-card';
|
||||
import { useMyTeam } from '../../lib/hooks/use-my-team';
|
||||
import { useRewards } from '../../lib/hooks/use-rewards';
|
||||
import { Trans } from 'react-i18next';
|
||||
import { DocsLinks } from '@vegaprotocol/environment';
|
||||
|
||||
export const CompetitionsHome = () => {
|
||||
const t = useT();
|
||||
@ -44,10 +51,34 @@ export const CompetitionsHome = () => {
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<CompetitionsHeader title={t('Competitions')}>
|
||||
<p className="text-lg mb-3">
|
||||
<Trans
|
||||
i18nKey={
|
||||
'Check the cards below to see what community-created, on-chain games are active and how to compete. Joining a team also lets you take part in the on-chain <0>referral program</0>.'
|
||||
}
|
||||
components={[
|
||||
<Link className="underline" key="ref-prog" to={Links.REFERRALS()}>
|
||||
referral program
|
||||
</Link>,
|
||||
]}
|
||||
/>
|
||||
</p>
|
||||
<p className="text-lg mb-1">
|
||||
{t(
|
||||
'Be a team player! Participate in games and work together to rake in as much profit to win.'
|
||||
)}
|
||||
<Trans
|
||||
i18nKey={
|
||||
'Got an idea for a competition? Anyone can define and fund one -- <0>propose an on-chain game</0> yourself.'
|
||||
}
|
||||
components={[
|
||||
<ExternalLink
|
||||
className="underline"
|
||||
key="propose"
|
||||
href={DocsLinks?.ASSET_TRANSFER_PROPOSAL}
|
||||
>
|
||||
propose an on-chain game
|
||||
</ExternalLink>,
|
||||
]}
|
||||
/>
|
||||
{/** Docs: https://docs.vega.xyz/mainnet/tutorials/proposals/asset-transfer-proposal */}
|
||||
</p>
|
||||
</CompetitionsHeader>
|
||||
|
||||
@ -74,7 +105,7 @@ export const CompetitionsHome = () => {
|
||||
variant="A"
|
||||
title={t('Create a team')}
|
||||
description={t(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipisicing elit placeat ipsum minus nemo error dicta.'
|
||||
'Create a new team, share your code with potential members, or set a whitelist for an exclusive group.'
|
||||
)}
|
||||
actionElement={
|
||||
<TradingButton
|
||||
@ -93,7 +124,7 @@ export const CompetitionsHome = () => {
|
||||
variant="B"
|
||||
title={t('Solo team / lone wolf')}
|
||||
description={t(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipisicing elit placeat ipsum minus nemo error dicta.'
|
||||
'Want to compete but think the best team size is one? This is the option for you.'
|
||||
)}
|
||||
actionElement={
|
||||
<TradingButton
|
||||
@ -111,7 +142,7 @@ export const CompetitionsHome = () => {
|
||||
variant="C"
|
||||
title={t('Join a team')}
|
||||
description={t(
|
||||
'Lorem ipsum dolor sit amet, consectetur adipisicing elit placeat ipsum minus nemo error dicta.'
|
||||
'Browse existing public teams to find your perfect match.'
|
||||
)}
|
||||
actionElement={
|
||||
<TradingButton
|
||||
@ -130,7 +161,24 @@ export const CompetitionsHome = () => {
|
||||
)}
|
||||
|
||||
{/** List of available games */}
|
||||
<h2 className="text-2xl mb-6">{t('Games')}</h2>
|
||||
<h2 className="text-2xl mb-1">{t('Games')}</h2>
|
||||
<p className="mb-6 text-sm">
|
||||
<Trans
|
||||
i18nKey={
|
||||
'See all the live games on the cards below. Every on-chain game is community funded and designed. <0>Find out how to create one</0>.'
|
||||
}
|
||||
components={[
|
||||
<ExternalLink
|
||||
className="underline"
|
||||
key="find-out"
|
||||
href={DocsLinks?.ASSET_TRANSFER_PROPOSAL}
|
||||
>
|
||||
Find out how to create one
|
||||
</ExternalLink>,
|
||||
]}
|
||||
/>
|
||||
{/** Docs: https://docs.vega.xyz/mainnet/tutorials/proposals/asset-transfer-proposal */}
|
||||
</p>
|
||||
|
||||
{gamesLoading ? (
|
||||
<Loader size="small" />
|
||||
@ -139,12 +187,21 @@ export const CompetitionsHome = () => {
|
||||
)}
|
||||
|
||||
{/** The teams ranking */}
|
||||
<div className="mb-6 flex flex-row items-baseline justify-between">
|
||||
<h2 className="text-2xl">{t('Leaderboard')}</h2>
|
||||
<div className="mb-1 flex flex-row items-baseline gap-3 justify-between">
|
||||
<h2 className="text-2xl">
|
||||
<Link to={Links.COMPETITIONS_TEAMS()} className=" underline">
|
||||
{t('Leaderboard')}
|
||||
</Link>
|
||||
</h2>
|
||||
<Link to={Links.COMPETITIONS_TEAMS()} className="text-sm underline">
|
||||
{t('View all teams')}
|
||||
</Link>
|
||||
</div>
|
||||
<p className="mb-6 text-sm">
|
||||
{t(
|
||||
'Teams can earn rewards if they meet the goals set in the on-chain trading competitions. Track your earned rewards here, and see which teams are top of the leaderboard this month.'
|
||||
)}
|
||||
</p>
|
||||
|
||||
{teamsLoading ? (
|
||||
<Loader size="small" />
|
||||
|
@ -87,6 +87,7 @@ export const DocsLinks = VEGA_DOCS_URL
|
||||
QUANTUM: `${VEGA_DOCS_URL}/concepts/assets/asset-framework#quantum`,
|
||||
REFERRALS: `${VEGA_DOCS_URL}/tutorials/proposals/referral-program-proposal`,
|
||||
LIQUIDITY_FEE_PERCENTAGE: `${VEGA_DOCS_URL}/concepts/liquidity/rewards-penalties#determining-the-liquidity-fee-percentage`,
|
||||
ASSET_TRANSFER_PROPOSAL: `${VEGA_DOCS_URL}/tutorials/proposals/asset-transfer-proposal`,
|
||||
}
|
||||
: undefined;
|
||||
|
||||
|
@ -445,7 +445,6 @@
|
||||
"Leaderboard": "Leaderboard",
|
||||
"View all teams": "View all teams",
|
||||
"Competitions": "Competitions",
|
||||
"Be a team player! Participate in games and work together to rake in as much profit to win.": "Be a team player! Participate in games and work together to rake in as much profit to win.",
|
||||
"Create a public team": "Create a public team",
|
||||
"Create a private team": "Create a private team",
|
||||
"Choose a team": "Choose a team",
|
||||
@ -462,5 +461,12 @@
|
||||
"Daily reward amount": "Daily reward amount",
|
||||
"Amount earned this epoch": "Amount earned this epoch",
|
||||
"Cumulative amount earned": "Cumulative amount earned",
|
||||
"Game details": "Game details"
|
||||
"Game details": "Game details",
|
||||
"Check the cards below to see what community-created, on-chain games are active and how to compete. Joining a team also lets you take part in the on-chain <0>referral program</0>.": "Check the cards below to see what community-created, on-chain games are active and how to compete. Joining a team also lets you take part in the on-chain <0>referral program</0>.",
|
||||
"Got an idea for a competition? Anyone can define and fund one -- <0>propose an on-chain game</0> yourself.": "Got an idea for a competition? Anyone can define and fund one -- <0>propose an on-chain game</0> yourself.",
|
||||
"Create a new team, share your code with potential members, or set a whitelist for an exclusive group.": "Create a new team, share your code with potential members, or set a whitelist for an exclusive group.",
|
||||
"Want to compete but think the best team size is one? This is the option for you.": "Want to compete but think the best team size is one? This is the option for you.",
|
||||
"Browse existing public teams to find your perfect match.": "Browse existing public teams to find your perfect match.",
|
||||
"See all the live games on the cards below. Every on-chain game is community funded and designed. <0>Find out how to create one</0>.": "See all the live games on the cards below. Every on-chain game is community funded and designed. <0>Find out how to create one</0>.",
|
||||
"Teams can earn rewards if they meet the goals set in the on-chain trading competitions. Track your earned rewards here, and see which teams are top of the leaderboard this month.": "Teams can earn rewards if they meet the goals set in the on-chain trading competitions. Track your earned rewards here, and see which teams are top of the leaderboard this month."
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user