diff --git a/app/components/layout/index.tsx b/app/components/layout/index.tsx index 88248476d2..36e4e98ecc 100644 --- a/app/components/layout/index.tsx +++ b/app/components/layout/index.tsx @@ -1,6 +1,7 @@ import { Link, useLocation, useMatches } from "@remix-run/react"; import clsx from "clsx"; import * as React from "react"; +import { ErrorBoundary } from "react-error-boundary"; import { useTranslation } from "react-i18next"; import { useIsMounted } from "~/hooks/useIsMounted"; import type { RootLoaderData } from "~/root"; @@ -155,5 +156,9 @@ function MyRampUnit() { return
; } - return ; + return ( + + + + ); } diff --git a/app/components/ramp/Ramp.tsx b/app/components/ramp/Ramp.tsx index cc54d25927..842570fdc2 100644 --- a/app/components/ramp/Ramp.tsx +++ b/app/components/ramp/Ramp.tsx @@ -113,6 +113,7 @@ export default class Ramp extends React.Component { componentWillUnmount() { window.ramp.que.push(() => { + if (!this.unitToAdd) return; cleanUp(this.unitToAdd.selectorId); }); } diff --git a/app/components/ramp/RampUnit.tsx b/app/components/ramp/RampUnit.tsx index fe0ca197bd..cc48b5da76 100644 --- a/app/components/ramp/RampUnit.tsx +++ b/app/components/ramp/RampUnit.tsx @@ -78,6 +78,7 @@ export default class RampUnit extends React.Component { } componentWillUnmount() { window.ramp.que.push(() => { + if (!this.unitToAdd) return; cleanUp(this.unitToAdd.selectorId); }); } diff --git a/app/root.tsx b/app/root.tsx index afd541d197..fa05e2dde4 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -18,6 +18,7 @@ import { import generalI18next from "i18next"; import NProgress from "nprogress"; import * as React from "react"; +import { ErrorBoundary as ClientErrorBoundary } from "react-error-boundary"; import { useTranslation } from "react-i18next"; import { useChangeLanguage } from "remix-i18next/react"; import type { SendouRouteHandle } from "~/utils/remix"; @@ -474,9 +475,11 @@ function MyRamp({ data }: { data: RootLoaderData | undefined }) { } return ( - + + + ); }