diff --git a/src/pages/dapps.tsx b/src/pages/dapps.tsx
index 1caf83c655b..703511ae64e 100644
--- a/src/pages/dapps.tsx
+++ b/src/pages/dapps.tsx
@@ -1,4 +1,5 @@
import React, {
+ BaseHTMLAttributes,
type ComponentPropsWithRef,
ReactNode,
useEffect,
@@ -9,23 +10,10 @@ import { type GetStaticProps } from "next"
import { useRouter } from "next/router"
import { useTranslation } from "next-i18next"
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
-import {
- Badge,
- Box,
- Button,
- type ButtonProps,
- Flex,
- type FlexProps,
- Heading,
- type HeadingProps,
- SimpleGrid,
- useToken,
-} from "@chakra-ui/react"
import type { BasePageProps, ChildOnlyProp, Lang } from "@/lib/types"
import BoxGrid from "@/components/BoxGrid"
-import ButtonLink from "@/components/Buttons/ButtonLink"
import Callout from "@/components/Callout"
import CalloutBanner from "@/components/CalloutBanner"
import Card from "@/components/Card"
@@ -33,12 +21,9 @@ import DocLink from "@/components/DocLink"
import Emoji from "@/components/Emoji"
import FeedbackCard from "@/components/FeedbackCard"
import GhostCard from "@/components/GhostCard"
-import { Image } from "@/components/Image"
+import { TwImage } from "@/components/Image"
import InfoBanner from "@/components/InfoBanner"
-import InlineLink, { BaseLink } from "@/components/Link"
import MainArticle from "@/components/MainArticle"
-import OldHeading from "@/components/OldHeading"
-import Text from "@/components/OldText"
import PageHero from "@/components/PageHero"
import PageMetadata from "@/components/PageMetadata"
import ProductCard from "@/components/ProductCard"
@@ -46,8 +31,13 @@ import ProductListComponent, {
type ProductListProps,
} from "@/components/ProductList"
import Translation from "@/components/Translation"
+import { Button, ButtonLink, ButtonProps } from "@/components/ui/buttons/Button"
import { Divider } from "@/components/ui/divider"
+import { Flex, FlexProps } from "@/components/ui/flex"
+import InlineLink, { BaseLink } from "@/components/ui/Link"
+import { Tag } from "@/components/ui/tag"
+import { cn } from "@/lib/utils/cn"
import { existsNamespace } from "@/lib/utils/existsNamespace"
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
import { trackCustomEvent } from "@/lib/utils/matomo"
@@ -126,26 +116,20 @@ import wallet from "@/public/images/wallet.png" // width=300
const Page = (props: ChildOnlyProp & FlexProps) => (
+ asChild
+ className={cn("mx-auto w-full flex-col items-center", props.className)}
+ >
+
+
)
const Content = (props: ChildOnlyProp) => (
-
+
)
const OptionContainer = (props: ChildOnlyProp) => (
)
@@ -153,145 +137,85 @@ const OptionContainer = (props: ChildOnlyProp) => (
const Option = (
props: Pick & { isActive: boolean }
) => {
- const tableBoxShadow = useToken("colors", "tableBoxShadow")
-
return (
)
}
const OptionText = (props: ChildOnlyProp) => (
-
)
const ButtonPrimary = (props: Pick) => (
-
+
)
const ButtonSecondary = (props: Pick) => (
-
+
)
const ImageContainer = (props: Pick) => (
-
+
)
const Subtitle = (props: ChildOnlyProp) => (
-
)
const Row = (props: ChildOnlyProp) => (
-
+
)
const IntroRow = (props: ChildOnlyProp) => (
)
const TwoColumnContent = (props: ChildOnlyProp) => (
)
const StyledH2 = (props: ChildOnlyProp) => (
-
+
)
-const H2 = (props: HeadingProps) => (
- ) => (
+
)
-const H3 = (props: HeadingProps) => (
-
+const H3 = (props: BaseHTMLAttributes) => (
+
)
const StyledH3 = (props: ChildOnlyProp) => (
-
+
)
const StyledInfoBanner = (props: ComponentPropsWithRef) => (
@@ -299,79 +223,49 @@ const StyledInfoBanner = (props: ComponentPropsWithRef) => (
)
const Column = (props: ChildOnlyProp) => (
-
+
)
const FullWidthContainer = (
props: ChildOnlyProp & { ref: React.RefObject }
) => (
)
const CardContainer = (props: ChildOnlyProp) => (
-
+
)
const StepBoxContainer = (props: ChildOnlyProp) => (
)
const StepBox = (props: ComponentPropsWithRef) => (
)
const CenterText = (props: ChildOnlyProp) => (
-
)
const LeftColumn = (props: ChildOnlyProp) => (
-
+
)
const RightColumn = (props: ChildOnlyProp) => (
-
+
)
const StyledCallout = (props: ComponentPropsWithRef) => (
@@ -382,11 +276,14 @@ const StyledCallout = (props: ComponentPropsWithRef) => (
)
const StyledCardGrid = (props: ChildOnlyProp) => (
-
+
)
const MoreButtonContainer = (props: ChildOnlyProp) => (
-
+
)
const ProductList = (props: Omit) => {
@@ -1271,7 +1168,7 @@ const DappsPage = () => {
alt: t("page-dapps-uniswap-logo-alt"),
background: "#212f46",
type: CategoryType.FINANCE,
- pillColor: "tagMint",
+ pillColor: "success" as const,
},
{
name: "OpenSea",
@@ -1281,7 +1178,7 @@ const DappsPage = () => {
alt: t("page-dapps-opensea-logo-alt"),
background: "#181b21",
type: CategoryType.COLLECTIBLES,
- pillColor: "tagBlue",
+ pillColor: "tag" as const,
},
{
name: "Gods Unchained",
@@ -1291,7 +1188,7 @@ const DappsPage = () => {
alt: t("page-dapps-gods-unchained-logo-alt"),
background: "#111c25",
type: CategoryType.GAMING,
- pillColor: "tagOrange",
+ pillColor: "warning" as const,
},
{
name: "Ethereum Name Service",
@@ -1301,7 +1198,7 @@ const DappsPage = () => {
alt: t("page-dapps-ens-logo-alt"),
background: "#fff",
type: CategoryType.SOCIAL,
- pillColor: "tagMint",
+ pillColor: "success" as const,
},
]
@@ -1344,19 +1241,21 @@ const DappsPage = () => {
{t("common:get-started")}
-
+
-
+
-
+
{/* TODO: Use CSS counter for intl-friendly numbering */}
1. {t("page-wallets-get-some")}
-
{t("page-dapps-get-some-eth-description")}
-
+
+ {t("page-dapps-get-some-eth-description")}
+
+
trackCustomEvent({
@@ -1370,10 +1269,12 @@ const DappsPage = () => {
-
+
2. {t("page-dapps-set-up-a-wallet-title")}
-
{t("page-dapps-set-up-a-wallet-description")}
-
+
+ {t("page-dapps-set-up-a-wallet-description")}
+
+
trackCustomEvent({
@@ -1387,10 +1288,10 @@ const DappsPage = () => {
-
+
3. {t("page-dapps-ready-title")}
-
{t("page-dapps-ready-description")}
-
+
{t("page-dapps-ready-description")}
+
trackCustomEvent({
@@ -1408,7 +1309,7 @@ const DappsPage = () => {
{t("page-dapps-beginner-friendly-header")}
- {t("page-dapps-beginner-friendly-description")}
+ {t("page-dapps-beginner-friendly-description")}
{editorChoices.map((choice, idx) => (
{
image={choice.image}
name={choice.name}
>
-
+
{choice.type}
-
+
))}
@@ -1554,16 +1455,16 @@ const DappsPage = () => {
/>
-
-
+
+
{t("page-dapps:page-dapps-explore-title")}
-
-
+
+
{t("page-dapps:page-dapps-explore")}
-
-
+
+
{
imageWidth={300}
alt={t("page-dapps-wallet-callout-image-alt")}
>
-
+
{t("page-dapps-wallet-callout-button")}
-
+
)}
@@ -1795,28 +1696,30 @@ const DappsPage = () => {
)}
{selectedCategory !== CategoryType.FINANCE && (
-
+
{t("page-dapps:page-dapps-explore-title")}
-
-
+
+
{t("page-dapps:page-dapps-explore")}
-
+
)}
{/* General content for all categories */}
{categories[selectedCategory].benefits && (
-
+
{t("page-dapps-magic-title-1")}{" "}
{" "}
{t("page-dapps-magic-title-2")}{" "}
{categories[selectedCategory].benefitsTitle}
-
{categories[selectedCategory].benefitsDescription}
+
+ {categories[selectedCategory].benefitsDescription}
+
{(categories[selectedCategory].benefits || []).map(
(art, idx) => (
@@ -1851,37 +1754,25 @@ const DappsPage = () => {
)}
-
+
)}
-
-
+
{t("page-dapps-magic-behind-dapps-title")}
-
+
{t("page-dapps-magic-behind-dapps-description")}
-
+
{t("page-dapps-magic-behind-dapps-link")}
@@ -1890,11 +1781,11 @@ const DappsPage = () => {
{t("page-dapps-how-dapps-work-title")}
-
+
-
- {t("page-dapps-how-dapps-work-p2")}
- {t("page-dapps-how-dapps-work-p3")}
+
+ {t("page-dapps-how-dapps-work-p2")}
+ {t("page-dapps-how-dapps-work-p3")}
{t("page-dapps-docklink-dapps")}
@@ -1909,11 +1800,11 @@ const DappsPage = () => {
image={developers}
alt={t("page-dapps-learn-callout-image-alt")}
>
-
+
{t("page-dapps-learn-callout-button")}
-
+