Skip to content

Commit 75b9ddb

Browse files
committed
feat: add Markets tab to Dashboard page
1 parent fe089e9 commit 75b9ddb

101 files changed

Lines changed: 1707 additions & 489 deletions

File tree

Some content is hidden

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

.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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { cn } from '@venusprotocol/ui';
2+
import type { To } from 'react-router';
3+
4+
import { ButtonWrapper } from 'components';
5+
import { Link } from 'containers/Link';
6+
7+
export interface BannerProps {
8+
title: string;
9+
description: string;
10+
buttonLabel: string;
11+
children?: React.ReactNode;
12+
to?: To;
13+
href?: string;
14+
className?: string;
15+
}
16+
17+
export const Banner: React.FC<BannerProps> = ({
18+
className,
19+
title,
20+
description,
21+
buttonLabel,
22+
to,
23+
href,
24+
children,
25+
}) => (
26+
<div
27+
className={cn(
28+
'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',
29+
className,
30+
)}
31+
>
32+
<div className="absolute size-full inset-0">{children}</div>
33+
34+
<div className="relative max-w-64 @min-[357px]:max-w-86 @min-[357px]:pr-7 @min-[576px]:max-w-none">
35+
<p className="text-p2s mb-2">{title}</p>
36+
37+
<p className="mb-3 text-light-grey @min-[357px]:mb-6 ">{description}</p>
38+
39+
<ButtonWrapper size="xs" asChild>
40+
<Link to={to} href={href} noStyle>
41+
{buttonLabel}
42+
</Link>
43+
</ButtonWrapper>
44+
</div>
45+
</div>
46+
);
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
47.6 KB
Loading
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 backgroundIllustrationJpg from './background.jpg';
4+
import coinIllustrationSrc from './coin.png';
5+
6+
const LEARN_MORE_URL = 'https://probable.markets';
7+
8+
export const ProbableBanner: React.FC = () => {
9+
const { t } = useTranslation();
10+
11+
return (
12+
<Banner
13+
title={t('adCarousel.probableBanner.title')}
14+
description={t('adCarousel.probableBanner.description')}
15+
buttonLabel={t('adCarousel.probableBanner.buttonLabel')}
16+
className="bg-black"
17+
href={LEARN_MORE_URL}
18+
>
19+
<img
20+
className="absolute max-w-none left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] size-full object-cover"
21+
src={backgroundIllustrationJpg}
22+
alt={t('adCarousel.probableBanner.backgroundIllustration.altText')}
23+
/>
24+
25+
<img
26+
className="absolute max-w-none w-55 bottom-0 -right-6 @min-[357px]:w-80 @min-[357px]:-right-11 @min-[576px]:w-57 @min-[576px]:right-2 @min-[896px]:right-30 @min-[1120px]:w-66 @min-[1120px]:right-10"
27+
src={coinIllustrationSrc}
28+
alt={t('adCarousel.probableBanner.coinIllustration.altText')}
29+
/>
30+
</Banner>
31+
);
32+
};

0 commit comments

Comments
 (0)