Skip to content

Commit 1f6beaf

Browse files
authored
feat(ui-ux): add explore dex page hero banner (#560)
* feat(ui-ux): add explore dex page hero banner * fix missing translation * fix index of explore headers
1 parent dd9af4b commit 1f6beaf

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"heroBanner": {
3+
"title": "DECENTRALIZED EXCHANGE",
4+
"subtitle": "Enter the world of dTokens",
5+
"desc": "Inside DeFiChain’s DEX, you are in full control. Trade, Arbitrage, and Earn from your dTokens."
6+
}
7+
}

src/layouts/components/Explore.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ export function Explore() {
2323
{
2424
icon: "dex",
2525
href: "/explore/dex",
26-
title: entries[2].title,
27-
subtitle: entries[2].subtitle,
26+
title: entries[1].title,
27+
subtitle: entries[1].subtitle,
2828
},
2929
{
3030
icon: "wallet",
3131
href: "/explore/wallets",
32-
title: entries[3].title,
33-
subtitle: entries[3].subtitle,
32+
title: entries[2].title,
33+
subtitle: entries[2].subtitle,
3434
},
3535
{
3636
icon: "masternode",
3737
href: "/explore/masternodes",
38-
title: entries[4].title,
39-
subtitle: entries[4].subtitle,
38+
title: entries[3].title,
39+
subtitle: entries[3].subtitle,
4040
},
4141
],
4242
},

src/pages/explore/dex/index.page.tsx

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { SSRConfig, useTranslation } from "next-i18next";
2+
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
3+
import { HeroBanner, HeroBannerBg } from "@components/commons/HeroBanner";
4+
5+
export default function ExploreWallets() {
6+
const { t } = useTranslation("page-explore-dex");
7+
return (
8+
<HeroBanner
9+
title={t("heroBanner.title")}
10+
subtitle={t("heroBanner.subtitle")}
11+
desc={t("heroBanner.desc")}
12+
heroBg={HeroBannerBg.DIAMOND_COIN}
13+
hasStartExploringButton
14+
startExploringJumpLink=""
15+
/>
16+
);
17+
}
18+
19+
export async function getStaticProps({
20+
locale,
21+
}): Promise<{ props: SSRConfig }> {
22+
return {
23+
props: {
24+
...(await serverSideTranslations(locale, [
25+
"common",
26+
"layout",
27+
"page-explore-dex",
28+
])),
29+
},
30+
};
31+
}

0 commit comments

Comments
 (0)