UNPKG

@equinor/mad-core

Version:

Core library for the Mobile App Delivery team

24 lines (21 loc) 636 B
import { __spreadProps, __spreadValues } from "./chunk-CWMXXUWU.js"; // src/components/ErrorBoundary.tsx import React from "react"; import { ErrorBoundary as MadErrorBoundary } from "@equinor/mad-components"; import { trackCustom } from "@equinor/mad-insights"; var ErrorBoundary = (props) => /* @__PURE__ */ React.createElement( MadErrorBoundary, __spreadProps(__spreadValues({}, props), { onError: (error, info) => { var _a; trackCustom(`${error.name} - ${error.message}`, { error, info }); (_a = props.onError) == null ? void 0 : _a.call(props, error, info); } }) ); export { ErrorBoundary };