From 3970d4583bfb88089a983cb954da1ebb29a620e0 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 13 Sep 2024 22:44:18 +0200 Subject: [PATCH] Fix lint and build --- src/components/ErrorBoundary/ErrorBoundary.tsx | 4 ++-- src/components/FileCellRender/FileCell.tsx | 2 +- src/main.tsx | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/ErrorBoundary/ErrorBoundary.tsx b/src/components/ErrorBoundary/ErrorBoundary.tsx index 40bf4aa..d89b965 100644 --- a/src/components/ErrorBoundary/ErrorBoundary.tsx +++ b/src/components/ErrorBoundary/ErrorBoundary.tsx @@ -1,6 +1,6 @@ import { Placeholder } from "@codex-storage/marketplace-ui-components"; import { CircleX } from "lucide-react"; -import React, { ErrorInfo, ReactNode } from "react"; +import React, { ReactNode } from "react"; import "./ErrorBoundary.css"; import * as Sentry from "@sentry/browser"; @@ -23,7 +23,7 @@ export class ErrorBoundary extends React.Component { return { hasError: true }; } - componentDidCatch(error: Error, info: ErrorInfo) { + componentDidCatch(error: Error) { if (import.meta.env.PROD) { Sentry.captureException(error); } diff --git a/src/components/FileCellRender/FileCell.tsx b/src/components/FileCellRender/FileCell.tsx index c1fdff4..744f7f7 100644 --- a/src/components/FileCellRender/FileCell.tsx +++ b/src/components/FileCellRender/FileCell.tsx @@ -15,7 +15,7 @@ export function FileCell({ requestId, purchaseCid }: Props) { const [metadata, setMetadata] = useState({ name: "N/A.jpg", mimetype: "N/A", - uploadedAt: new Date(0, 0, 0, 0, 0, 0), + uploadedAt: new Date(0, 0, 0, 0, 0, 0).toJSON(), }); useEffect(() => { diff --git a/src/main.tsx b/src/main.tsx index d64d3d2..03bbe36 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -56,13 +56,13 @@ const rootElement = document.getElementById("root")!; if (rootElement) { const root = ReactDOM.createRoot(rootElement); - await CodexSdk.load(); - - root.render( - - - - - - ); + CodexSdk.load().then(() => { + root.render( + + + + + + ); + }); }