diff --git a/components/ErrorBoundary.tsx b/components/ErrorBoundary.tsx index 5a2817985..19f54247a 100644 --- a/components/ErrorBoundary.tsx +++ b/components/ErrorBoundary.tsx @@ -1,6 +1,6 @@ import React from 'react' -class ErrorBoundary extends React.Component<{}, { hasError: boolean; message: string }> { +class ErrorBoundary extends React.Component<{ children: React.ReactNode }, { hasError: boolean; message: string }> { constructor(props) { super(props) this.state = { diff --git a/components/FilterMenu/AgeFilterMenu.tsx b/components/FilterMenu/AgeFilterMenu.tsx index 8a498daf5..3bcf6874b 100644 --- a/components/FilterMenu/AgeFilterMenu.tsx +++ b/components/FilterMenu/AgeFilterMenu.tsx @@ -211,6 +211,7 @@ const AgeFilterMenu: React.FC<{ filterKeys: Array }> = ({ filterKeys }) type={alert.type} /> = ({ inventory, view return ( <>
- {inventory.entries.map((item, idx) => { - const { - owner: { - account: { bit_alias, eth_address }, - }, - } = item - + {inventory.entries?.map((item, idx) => { return (
@@ -158,7 +152,7 @@ const MultiTokenInventoryList: React.FC = ({ inventory, view {token_id ? (
{t('owner')} -
+
) : (
diff --git a/components/NFTActivityList/index.tsx b/components/NFTActivityList/index.tsx index 1dc0b9759..6696318eb 100644 --- a/components/NFTActivityList/index.tsx +++ b/components/NFTActivityList/index.tsx @@ -116,8 +116,8 @@ const ActivityList: React.FC< {transfers?.metadata.total_count ? ( - transfers.entries.map(item => { - const method = item.transaction.method_name || item.transaction.method_id + transfers.entries?.map(item => { + const method = item.transaction?.method_name || item.transaction?.method_id const fromBitAlias = item.from_account?.bit_alias const toBitAlias = item.to_account?.bit_alias @@ -158,10 +158,10 @@ const ActivityList: React.FC< -
+
-
+
{viewer ? ( diff --git a/components/PageTitle/index.tsx b/components/PageTitle/index.tsx index 19e7b2a9d..d9dadbf69 100644 --- a/components/PageTitle/index.tsx +++ b/components/PageTitle/index.tsx @@ -1,5 +1,9 @@ +import { PropsWithChildren } from 'react' import styles from './styles.module.scss' +interface Props { + children: React.ReactNode +} -const PageTitle: React.FC = ({ children }) =>
{children}
+const PageTitle: React.FC> = ({ children }) =>
{children}
export default PageTitle diff --git a/package-lock.json b/package-lock.json index f51b243b3..3ddd7d7c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "@types/node": "18.11.19", "@types/phoenix": "1.5.4", "@types/qrcode": "1.5.0", - "@types/react": "17.0.53", + "@types/react": "18.0.4", "@types/react-dom": "18.0.11", "@types/testing-library__jest-dom": "5.14.5", "@types/testing-library__react": "10.2.0", @@ -8015,9 +8015,9 @@ } }, "node_modules/@types/react": { - "version": "17.0.53", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.53.tgz", - "integrity": "sha512-1yIpQR2zdYu1Z/dc1OxC+MA6GR240u3gcnP4l6mvj/PJiVaqHsQPmWttsvHsfnhfPbU2FuGmo0wSITPygjBmsw==", + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.4.tgz", + "integrity": "sha512-Zm4ryWh9xQbMX6ge7Ej/nS6VBoT+9wzvwd/hZ+9EONGjBkejyyvEKndZt/DZHHj1lSU/YeTPyJAn22S3GnYchQ==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -32000,9 +32000,9 @@ } }, "@types/react": { - "version": "17.0.53", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.53.tgz", - "integrity": "sha512-1yIpQR2zdYu1Z/dc1OxC+MA6GR240u3gcnP4l6mvj/PJiVaqHsQPmWttsvHsfnhfPbU2FuGmo0wSITPygjBmsw==", + "version": "18.0.4", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.4.tgz", + "integrity": "sha512-Zm4ryWh9xQbMX6ge7Ej/nS6VBoT+9wzvwd/hZ+9EONGjBkejyyvEKndZt/DZHHj1lSU/YeTPyJAn22S3GnYchQ==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", diff --git a/package.json b/package.json index 24cab9698..0e97aef31 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@types/node": "18.11.19", "@types/phoenix": "1.5.4", "@types/qrcode": "1.5.0", - "@types/react": "17.0.53", + "@types/react": "18.0.4", "@types/react-dom": "18.0.11", "@types/testing-library__jest-dom": "5.14.5", "@types/testing-library__react": "10.2.0", @@ -81,5 +81,8 @@ }, "lint-staged": { "**/*": "npm run format" + }, + "resolutions": { + "react-i18next": ">=11.16.4" } } diff --git a/pages/nft-collections/index.tsx b/pages/nft-collections/index.tsx index dcc4746b5..21c2458f6 100644 --- a/pages/nft-collections/index.tsx +++ b/pages/nft-collections/index.tsx @@ -130,7 +130,7 @@ const NftCollectionList = () => { const orderedSorter = handleSorterArrayInOrder(clickedSorter ? sorterArrayFromPath : DEFAULT_SORTERS, clickedSorter) for (const item of orderedSorter) { - searchParams.append(item.type, item.order) + searchParams.append(item?.type, item?.order) } return `${asPath.split('?')[0] ?? ''}?${searchParams}`