feat(components): add ErrorBoundary

This commit is contained in:
AAGaming
2024-06-27 00:06:00 -04:00
parent 58e3d35e1e
commit dcdbb2d6c7
3 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import { Component, PropsWithChildren } from "react";
import { findModuleExport } from "../webpack";
export const ErrorBoundary = findModuleExport(
(e) => e.InstallErrorReportingStore && e?.prototype?.Reset && e?.prototype?.componentDidCatch,
) as Component<PropsWithChildren>;