Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui-ux): add explore dex page hero banner #560

Merged
merged 3 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions public/locales/en-US/page-explore-dex.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"heroBanner": {
"title": "DECENTRALIZED EXCHANGE",
"subtitle": "Enter the world of dTokens",
"desc": "Inside DeFiChain’s DEX, you are in full control. Trade, Arbitrage, and Earn from your dTokens."
}
}
12 changes: 6 additions & 6 deletions src/layouts/components/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ export function Explore() {
{
icon: "dex",
href: "/explore/dex",
title: entries[2].title,
subtitle: entries[2].subtitle,
title: entries[1].title,
subtitle: entries[1].subtitle,
},
{
icon: "wallet",
href: "/explore/wallets",
title: entries[3].title,
subtitle: entries[3].subtitle,
title: entries[2].title,
subtitle: entries[2].subtitle,
},
{
icon: "masternode",
href: "/explore/masternodes",
title: entries[4].title,
subtitle: entries[4].subtitle,
title: entries[3].title,
subtitle: entries[3].subtitle,
},
],
},
Expand Down
31 changes: 31 additions & 0 deletions src/pages/explore/dex/index.page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { SSRConfig, useTranslation } from "next-i18next";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
import { HeroBanner, HeroBannerBg } from "@components/commons/HeroBanner";

export default function ExploreWallets() {
const { t } = useTranslation("page-explore-dex");
return (
<HeroBanner
title={t("heroBanner.title")}
subtitle={t("heroBanner.subtitle")}
desc={t("heroBanner.desc")}
heroBg={HeroBannerBg.DIAMOND_COIN}
hasStartExploringButton
startExploringJumpLink=""
/>
);
}

export async function getStaticProps({
locale,
}): Promise<{ props: SSRConfig }> {
return {
props: {
...(await serverSideTranslations(locale, [
"common",
"layout",
"page-explore-dex",
])),
},
};
}