mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-19 01:20:20 +02:00
feat(components): add ErrorBoundary
This commit is contained in:
@@ -85,5 +85,9 @@
|
||||
"style": "module",
|
||||
"parser": "typescript"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/",
|
||||
"tag": "latest"
|
||||
}
|
||||
}
|
||||
|
||||
6
src/components/ErrorBoundary.ts
Normal file
6
src/components/ErrorBoundary.ts
Normal 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>;
|
||||
@@ -5,6 +5,7 @@ export * from './ControlsList';
|
||||
export * from './Dialog';
|
||||
export * from './DialogCheckbox';
|
||||
export * from './Dropdown';
|
||||
export * from './ErrorBoundary';
|
||||
export * from './Field';
|
||||
export * from './Focusable';
|
||||
export * from './FocusRing';
|
||||
|
||||
Reference in New Issue
Block a user