From 935be868891afe3230df20f42216e2b2716a06e1 Mon Sep 17 00:00:00 2001 From: Ganeshan M Date: Thu, 3 Oct 2024 21:13:48 +0530 Subject: [PATCH 1/4] feat: migrate StablecoinsTable to shadcn --- src/components/StablecoinsTable.tsx | 90 +++++++++++++---------------- 1 file changed, 39 insertions(+), 51 deletions(-) diff --git a/src/components/StablecoinsTable.tsx b/src/components/StablecoinsTable.tsx index 4522c25aed4..62f1cec52fb 100644 --- a/src/components/StablecoinsTable.tsx +++ b/src/components/StablecoinsTable.tsx @@ -1,17 +1,15 @@ import { useTranslation } from "next-i18next" + +import { ButtonLink } from "./ui/buttons/Button" +import { Flex } from "./ui/flex" import { - Flex, - Image, Table, - Tbody, - Td, - Text, - Th, - Thead, - Tr, -} from "@chakra-ui/react" - -import { ButtonLink } from "./Buttons" + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "./ui/Table" import { useRtlFlip } from "@/hooks/useRtlFlip" @@ -45,68 +43,58 @@ const StablecoinsTable = ({ } return ( - - - +
+ + {columns.map((column, idx) => ( - + ))} {content && content[0]?.url && ( - + + )} - - - + + + {hasError && ( - - - + + + {t("page-stablecoins-table-error")} + + )} {content.map(({ name, marketCap, image, type, url }, idx) => ( - - - - + + {marketCap} + + {stablecoinsType[type]} + {url && ( - + )} - + ))} - +
+ {column} - - + + ↗ - -
{t("page-stablecoins-table-error")}
+ - {image && } + {image && } <>{name} - {marketCap}{stablecoinsType[type]} + {t("page-stablecoins-go-to")} {name} -
) } From fb201850de0b696142f1557c3e25ad588cbdce73 Mon Sep 17 00:00:00 2001 From: Ganeshan M <86967803+0xgun@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:15:53 +0530 Subject: [PATCH 2/4] Update StablecoinsTable.tsx --- src/components/StablecoinsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/StablecoinsTable.tsx b/src/components/StablecoinsTable.tsx index 62f1cec52fb..20130ad31fa 100644 --- a/src/components/StablecoinsTable.tsx +++ b/src/components/StablecoinsTable.tsx @@ -53,7 +53,7 @@ const StablecoinsTable = ({ ))} {content && content[0]?.url && ( - + From 69035931742a1667258be7941f51b0c60a14ef42 Mon Sep 17 00:00:00 2001 From: Pablo Pettinari Date: Fri, 4 Oct 2024 14:03:03 +0200 Subject: [PATCH 3/4] cleanup styles --- src/components/StablecoinsTable.tsx | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/components/StablecoinsTable.tsx b/src/components/StablecoinsTable.tsx index 20130ad31fa..f6287669c56 100644 --- a/src/components/StablecoinsTable.tsx +++ b/src/components/StablecoinsTable.tsx @@ -44,16 +44,14 @@ const StablecoinsTable = ({ return ( - + {columns.map((column, idx) => ( - - {column} - + {column} ))} {content && content[0]?.url && ( - + @@ -71,22 +69,17 @@ const StablecoinsTable = ({ )} {content.map(({ name, marketCap, image, type, url }, idx) => ( - - + + {image && } <>{name} - {marketCap} - - {stablecoinsType[type]} - + {marketCap} + {stablecoinsType[type]} {url && ( - + {t("page-stablecoins-go-to")} {name} From 07ba5373deed569682248ef9ab793f11eee7045e Mon Sep 17 00:00:00 2001 From: Pablo Pettinari Date: Wed, 9 Oct 2024 21:45:01 +0200 Subject: [PATCH 4/4] Update src/components/StablecoinsTable.tsx --- src/components/StablecoinsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/StablecoinsTable.tsx b/src/components/StablecoinsTable.tsx index f6287669c56..883c7ac477a 100644 --- a/src/components/StablecoinsTable.tsx +++ b/src/components/StablecoinsTable.tsx @@ -43,7 +43,7 @@ const StablecoinsTable = ({ } return ( -
+
{columns.map((column, idx) => (