diff --git a/mdx-components.tsx b/mdx-components.tsx index fe94c76..a6a45a8 100644 --- a/mdx-components.tsx +++ b/mdx-components.tsx @@ -59,6 +59,7 @@ export const mdxComponents = { // customize how MDX components are rendered - use DSFR components when possible export function useMDXComponents(components: MDXComponents): MDXComponents { + // @ts-ignore TODO return { ...mdxComponents, ...components, diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx index b324ddf..9a1bac7 100644 --- a/src/pages/_error.tsx +++ b/src/pages/_error.tsx @@ -1,6 +1,6 @@ import NextErrorComponent, { ErrorProps as NextErrorProps } from "next/error"; import { NextPageContext } from "next"; -import * as Sentry from "@sentry/nextjs"; +import Sentry from "@sentry/nextjs"; import Error from "next/error"; export type ErrorPageProps = { @@ -22,7 +22,7 @@ const MyError = ({ // getInitialProps is not called in case of // https://github.com/vercel/next.js/issues/8592. As a workaround, we pass // err via _app.js so it can be captured - Sentry.captureException(err); + // Sentry.captureException(err); // Flushing is not required in this case as it only happens on the client } @@ -55,24 +55,24 @@ MyError.getInitialProps = async ( // componentDidMount, etc) that was caught by Next.js's React Error // Boundary. Read more about what types of exceptions are caught by Error // Boundaries: https://reactjs.org/docs/error-boundaries.html - await Sentry.captureUnderscoreErrorException(props); - if (err) { - Sentry.captureException(err); + // await Sentry.captureUnderscoreErrorException(props); + // if (err) { + // Sentry.captureException(err); - // Flushing before returning is necessary if deploying to Vercel, see - // https://vercel.com/docs/platform/limits#streaming-responses - await Sentry.flush(2000); + // // Flushing before returning is necessary if deploying to Vercel, see + // // https://vercel.com/docs/platform/limits#streaming-responses + // await Sentry.flush(2000); - return errorInitialProps; - } + // return errorInitialProps; + // } // If this point is reached, getInitialProps was called without any // information about what the error might be. This is unexpected and may // indicate a bug introduced in Next.js, so record it in Sentry - Sentry.captureException( - new Error(`_error.js getInitialProps missing data at path: ${asPath}`) - ); - await Sentry.flush(2000); + // Sentry.captureException( + // new Error(`_error.js getInitialProps missing data at path: ${asPath}`) + // ); + // await Sentry.flush(2000); return errorInitialProps; }; diff --git a/src/pages/collection/[id].tsx b/src/pages/collection/[id].tsx index 2eb65ce..648d206 100644 --- a/src/pages/collection/[id].tsx +++ b/src/pages/collection/[id].tsx @@ -38,10 +38,13 @@ function MyDropzone({ children: ReactNode; onDrop: (arg: File[]) => void; }) { - const onDropFiles = useCallback((acceptedFiles: File[]) => { - // Do something with the files - onDrop(acceptedFiles); - }, []); + const onDropFiles = useCallback( + (acceptedFiles: File[]) => { + // Do something with the files + onDrop(acceptedFiles); + }, + [onDrop] + ); const { getRootProps, getInputProps, isDragActive } = useDropzone({ onDrop: onDropFiles, noClick: true, @@ -74,7 +77,7 @@ export function Chat({ handleInputChange: UseChatHelpers["handleInputChange"]; input: UseChatHelpers["input"]; isLoading: UseChatHelpers["isLoading"]; - hintText: string; + hintText?: string; }) { return (
@@ -89,6 +92,7 @@ export function Chat({ /> )} = ({ reloadCollections(); }; - const myHandleSubmit = async (event) => { + const myHandleSubmit = async (event: any) => { event.preventDefault(); // get relevant RAG informations const searchResults = await getSearch({