diff --git a/src/components/Table/GeneralTableRow.tsx b/src/components/Table/GeneralTableRow.tsx index 6d19cc73..723e559d 100644 --- a/src/components/Table/GeneralTableRow.tsx +++ b/src/components/Table/GeneralTableRow.tsx @@ -34,6 +34,7 @@ export default function GeneralTableRow({ }, }; + // Note: This will give validateDOMNesting errors, but still work correctly if (to) { return ; } diff --git a/src/index.tsx b/src/index.tsx index 665b56d9..b794ce26 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import ReactDOM from "react-dom"; +import {createRoot} from "react-dom/client"; import {BrowserRouter} from "react-router-dom"; import {QueryClient, QueryClientProvider} from "@tanstack/react-query"; import ExplorerRoutes from "./ExplorerRoutes"; @@ -51,7 +51,9 @@ declare global { const queryClient = new QueryClient(); -ReactDOM.render( +const container = document.getElementById("root"); +const root = createRoot(container!); +root.render( , - document.getElementById("root"), ); diff --git a/src/pages/Blocks/Table.tsx b/src/pages/Blocks/Table.tsx index b3e33af0..42740750 100644 --- a/src/pages/Blocks/Table.tsx +++ b/src/pages/Blocks/Table.tsx @@ -26,11 +26,7 @@ type BlockCellProps = { function BlockHeightCell({block}: BlockCellProps) { return ( - + {block.block_height} @@ -56,7 +52,7 @@ function BlockHashCell({block}: BlockCellProps) { function FirstVersionCell({block}: BlockCellProps) { return ( - + {block.first_version} @@ -66,7 +62,7 @@ function FirstVersionCell({block}: BlockCellProps) { function LastVersionCell({block}: BlockCellProps) { return ( - + {block.last_version} diff --git a/src/pages/Transactions/Components/TransactionTypeTooltip.tsx b/src/pages/Transactions/Components/TransactionTypeTooltip.tsx index 23ffe327..c91fc300 100644 --- a/src/pages/Transactions/Components/TransactionTypeTooltip.tsx +++ b/src/pages/Transactions/Components/TransactionTypeTooltip.tsx @@ -12,7 +12,7 @@ export default function TransactionTypeTooltip() { {Object.values(TransactionTypeName).map((type) => ( - + ))} diff --git a/src/pages/Transactions/TransactionsTable.tsx b/src/pages/Transactions/TransactionsTable.tsx index e74add2a..380bf272 100644 --- a/src/pages/Transactions/TransactionsTable.tsx +++ b/src/pages/Transactions/TransactionsTable.tsx @@ -113,7 +113,7 @@ function TransactionReceiverOrCounterPartyCell({ return ( {counterparty && ( - {counterparty.role === "smartContract" ? ( @@ -128,7 +128,7 @@ function TransactionReceiverOrCounterPartyCell({ - + )} ); diff --git a/src/utils.ts b/src/utils.ts index f3dedbed..3f9f73ec 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -103,12 +103,15 @@ export const standardizeAddress = (address: AccountAddressInput): string => { export const tryStandardizeAddress = ( address: AccountAddressInput | null | undefined, + logError?: boolean, ): string | undefined => { if (address) { try { return standardizeAddress(address); } catch (e) { - console.log("Failed to standardize address", address, e); + if (logError) { + console.log("Failed to standardize address", address, e); + } return undefined; } }