Skip to content

Commit a590eab

Browse files
committed
replace table components with divs to fix hydration issues
1 parent 9b0b58a commit a590eab

File tree

1 file changed

+5
-10
lines changed
  • src/components/FindWallet/WalletTable

1 file changed

+5
-10
lines changed

src/components/FindWallet/WalletTable/index.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ import {
1313
SimpleGrid,
1414
SimpleGridProps,
1515
Stack,
16-
Table,
1716
TableProps,
18-
Td,
1917
Text,
20-
Th,
21-
Tr,
2218
} from "@chakra-ui/react"
2319

2420
import { ChildOnlyProp, WalletData, WalletFilter } from "@/lib/types"
@@ -50,7 +46,7 @@ import { WalletSupportedLanguageContext } from "@/contexts/WalletSupportedLangua
5046
import { useWalletTable } from "@/hooks/useWalletTable"
5147

5248
const Container = (props: TableProps) => (
53-
<Table
49+
<Box
5450
w="full"
5551
sx={{
5652
th: {
@@ -75,7 +71,6 @@ const WalletContainer = (props: ChildOnlyProp & ContainerProps) => (
7571

7672
const Grid = forwardRef<SimpleGridProps, "tr">((props, ref) => (
7773
<SimpleGrid
78-
as={Tr}
7974
ref={ref}
8075
templateColumns={{
8176
base: "60% auto 0% 0% 5%",
@@ -243,7 +238,7 @@ const WalletTable = ({
243238
return (
244239
<Container>
245240
<WalletContentHeader>
246-
<Th sx={{ textAlign: "start !important" }}>
241+
<Box sx={{ textAlign: "start !important" }}>
247242
<Flex justifyContent="space-between" px={{ base: 2.5, md: 0 }}>
248243
{/* Displayed on mobile only */}
249244
<Text
@@ -277,7 +272,7 @@ const WalletTable = ({
277272
</Text>
278273
)}
279274
</Flex>
280-
</Th>
275+
</Box>
281276
</WalletContentHeader>
282277
{filteredWallets.length === 0 && (
283278
<WalletEmptyState
@@ -346,7 +341,7 @@ const WalletTable = ({
346341
showMoreInfo(wallet)
347342
}}
348343
>
349-
<Td lineHeight="revert">
344+
<Box lineHeight="revert">
350345
<Flex
351346
justifyContent="space-between"
352347
alignItems="center"
@@ -478,7 +473,7 @@ const WalletTable = ({
478473
{t("page-find-wallet-visit-website")}
479474
</ButtonLink>
480475
</Box>
481-
</Td>
476+
</Box>
482477
</Wallet>
483478

484479
{wallet.moreInfo && (

0 commit comments

Comments
 (0)