Skip to content

Commit e511477

Browse files
committed
feat: add Markets tab to Dashboard page
1 parent 3c17007 commit e511477

File tree

105 files changed

+1885
-672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1885
-672
lines changed

.changeset/eager-ants-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@venusprotocol/evm": minor
3+
---
4+
5+
add Markets tab to Dashboard page
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { ButtonWrapper, cn } from '@venusprotocol/ui';
2+
import type { To } from 'react-router';
3+
4+
import { Link } from 'containers/Link';
5+
6+
export interface BannerProps {
7+
title: string;
8+
description: React.ReactNode;
9+
buttonLabel: string;
10+
children?: React.ReactNode;
11+
to?: To;
12+
href?: string;
13+
className?: string;
14+
}
15+
16+
export const Banner: React.FC<BannerProps> = ({
17+
className,
18+
title,
19+
description,
20+
buttonLabel,
21+
to,
22+
href,
23+
children,
24+
}) => (
25+
<div
26+
className={cn(
27+
'relative rounded-2xl overflow-hidden p-4 h-63 @min-[357px]:p-6 @min-[357px]:h-100 @min-[576px]:h-45 @min-[576px]:items-center @min-[1120px]:h-50',
28+
className,
29+
)}
30+
>
31+
<div className="absolute size-full inset-0">{children}</div>
32+
33+
<div className="relative max-w-64 @min-[357px]:max-w-86 @min-[357px]:pr-7 @min-[576px]:max-w-none">
34+
<p className="text-p2s mb-2">{title}</p>
35+
36+
<p className="mb-3 text-light-grey @min-[357px]:mb-6 ">{description}</p>
37+
38+
<ButtonWrapper size="xs" asChild>
39+
<Link to={to} href={href} noStyle>
40+
{buttonLabel}
41+
</Link>
42+
</ButtonWrapper>
43+
</div>
44+
</div>
45+
);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { useTranslation } from 'libs/translations';
2+
import { Banner } from '../Banner';
3+
import phoneIllustrationSrc from './phoneIllustration.png';
4+
5+
const BINANCE_WALLET_URL = 'https://binance.onelink.me/mL1z/vpktofz8?af_force_deeplink=true';
6+
7+
export const BinanceWalletBanner: React.FC = () => {
8+
const { t, Trans } = useTranslation();
9+
10+
return (
11+
<Banner
12+
title={t('adCarousel.binanceWalletBanner.title')}
13+
description={
14+
<Trans
15+
i18nKey="adCarousel.binanceWalletBanner.description"
16+
components={{
17+
WhiteText: <span className="text-white" />,
18+
}}
19+
/>
20+
}
21+
buttonLabel={t('adCarousel.binanceWalletBanner.buttonLabel')}
22+
className="bg-[linear-gradient(142deg,#00193A_20%,#0E3FB7_75%,#001E68_95%)]"
23+
href={BINANCE_WALLET_URL}
24+
>
25+
<img
26+
className="absolute w-80 max-w-none -bottom-10 -right-20 -rotate-15 @min-[357px]:w-120 @min-[357px]:-rotate-12 @min-[357px]:-bottom-9 @min-[357px]:right-auto @min-[357px]:left-10 @min-[409px]:-rotate-15 @min-[409px]:-bottom-5 @min-[409px]:left-12 @min-[576px]:w-80 @min-[576px]:-bottom-10 @min-[576px]:left-auto @min-[576px]:-right-4 @min-[576px]:-rotate-22 @min-[896px]:w-120 @min-[896px]:-rotate-14 @min-[896px]:-bottom-19 @min-[896px]:right-20"
27+
src={phoneIllustrationSrc}
28+
alt={t('adCarousel.binanceWalletBanner.phoneIllustration.altText')}
29+
/>
30+
</Banner>
31+
);
32+
};
85.2 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { VENUS_DOC_URL } from 'constants/production';
2+
import { useTranslation } from 'libs/translations';
3+
import { Banner } from '../Banner';
4+
import rocketIllustrationSrc from './rocket.png';
5+
6+
const LEARN_MORE_URL = `${VENUS_DOC_URL}/guides/leveraged-positions`;
7+
8+
export const BoostBanner: React.FC = () => {
9+
const { t } = useTranslation();
10+
11+
return (
12+
<Banner
13+
title={t('adCarousel.boostBanner.title')}
14+
description={t('adCarousel.boostBanner.description')}
15+
buttonLabel={t('adCarousel.boostBanner.buttonLabel')}
16+
className="bg-[linear-gradient(142deg,#00193A_20%,#0E3FB7_75%,#001E68_95%)]"
17+
href={LEARN_MORE_URL}
18+
>
19+
<img
20+
className="absolute size-112 max-w-none -bottom-45 -right-35 @min-[357px]:size-125 @min-[357px]:-bottom-33 @min-[357px]:right-auto @min-[357px]:-left-10 @min-[409px]:left-5 @min-[409px]:-bottom-44 @min-[576px]:h-119 @min-[576px]:-bottom-57 @min-[576px]:left-auto @min-[576px]:-right-12 @min-[896px]:size-160 @min-[896px]:rotate-12 @min-[896px]:-bottom-79 @min-[896px]:left-44 @min-[1120px]:size-194 @min-[1120px]:rotate-16 @min-[1120px]:-bottom-94 @min-[1120px]:left-80"
21+
src={rocketIllustrationSrc}
22+
alt={t('adCarousel.boostBanner.rocketIllustration.altText')}
23+
/>
24+
</Banner>
25+
);
26+
};
438 KB
Loading
64 KB
Loading
75.2 KB
Loading
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { VENUS_COMMUNITY_URL } from 'constants/production';
2+
import { useTranslation } from 'libs/translations';
3+
import { Banner } from '../Banner';
4+
import backgroundIllustrationJpg from './background.jpg';
5+
import coinsIllustrationSrc from './coins.png';
6+
7+
const LEARN_MORE_URL = `${VENUS_COMMUNITY_URL}/t/isolated-pools-sunset/5603`;
8+
9+
export const IsolatedPoolsSunsetBanner: React.FC = () => {
10+
const { t } = useTranslation();
11+
12+
return (
13+
<Banner
14+
title={t('adCarousel.isolatedPoolsSunsetBanner.title')}
15+
description={t('adCarousel.isolatedPoolsSunsetBanner.description')}
16+
buttonLabel={t('adCarousel.isolatedPoolsSunsetBanner.buttonLabel')}
17+
href={LEARN_MORE_URL}
18+
>
19+
<img
20+
className="absolute max-w-none size-130 top-0 left-[50%] translate-x-[-50%] @min-[357px]:size-180 @min-[357px]:-top-20 @min-[576px]:top-[50%] @min-[576px]:translate-y-[-30%] @min-[576px]:size-[200%]"
21+
src={backgroundIllustrationJpg}
22+
alt={t('adCarousel.isolatedPoolsSunsetBanner.backgroundIllustration.altText')}
23+
/>
24+
25+
<img
26+
className="absolute max-w-none size-62 -bottom-18 -right-10 @min-[357px]:size-97 @min-[357px]:-bottom-20 @min-[357px]:-right-16 @min-[576px]:size-80 @min-[576px]:-bottom-20 @min-[576px]:right-auto @min-[576px]:left-75 @min-[686px]:size-88 @min-[686px]:left-auto @min-[686px]:right-5 @min-[896px]:size-116 @min-[896px]:-bottom-33"
27+
src={coinsIllustrationSrc}
28+
alt={t('adCarousel.isolatedPoolsSunsetBanner.coinsIllustration.altText')}
29+
/>
30+
</Banner>
31+
);
32+
};
22.6 KB
Loading

0 commit comments

Comments
 (0)