From 01bc736d6b46e32aeed05a4dbf46f6d41ec43ba3 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Wed, 4 Jun 2025 16:09:58 +0300 Subject: [PATCH] fixes --- src/components/Tables/ForSaleTable.tsx | 32 ++++++-- src/components/Tables/NameTable.tsx | 104 +++++++++++++++++++------ src/i18n/locales/zh/core.json | 96 +++++++++++++++++++++++ 3 files changed, 200 insertions(+), 32 deletions(-) create mode 100644 src/i18n/locales/zh/core.json diff --git a/src/components/Tables/ForSaleTable.tsx b/src/components/Tables/ForSaleTable.tsx index 3e22014..3dd9ce9 100644 --- a/src/components/Tables/ForSaleTable.tsx +++ b/src/components/Tables/ForSaleTable.tsx @@ -8,8 +8,8 @@ import { Paper, Button, } from '@mui/material'; -import { useSetAtom } from 'jotai'; -import { forwardRef } from 'react'; +import { useAtom, useSetAtom } from 'jotai'; +import { forwardRef, useMemo } from 'react'; import { TableVirtuoso, TableComponents } from 'react-virtuoso'; import { forSaleAtom, @@ -105,7 +105,9 @@ function rowContent( setNames: SetNames, setNamesForSale: SetNamesForSale, isPrimaryNameForSale: boolean, - t: TFunction + t: TFunction, + nameStrings: string[], + pendingBuyNameStrings: string[] ) { const handleBuy = async (name: string) => { const loadId = showLoading( @@ -163,13 +165,17 @@ function rowContent( } }; + const isNameOwned = nameStrings.includes(row.name); + + const isNameBuying = pendingBuyNameStrings.includes(row.name); + return ( <> {row.name} {row.salePrice}