New source found from dndbeyond.com
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import React from "react";
|
||||
import { PureComponent, ErrorInfo, ReactNode, PropsWithChildren } from "react";
|
||||
|
||||
import { Link } from "~/components/Link";
|
||||
|
||||
import config from "../../../config";
|
||||
import { ErrorUtils } from "../../utils";
|
||||
|
||||
interface Props {}
|
||||
interface Props extends PropsWithChildren {}
|
||||
interface State {
|
||||
hasError: boolean;
|
||||
errorId: string | null;
|
||||
}
|
||||
export default class ErrorBoundary extends React.PureComponent<Props, State> {
|
||||
export default class ErrorBoundary extends PureComponent<Props, State> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@@ -25,7 +25,7 @@ export default class ErrorBoundary extends React.PureComponent<Props, State> {
|
||||
};
|
||||
}
|
||||
|
||||
componentDidCatch(error: Error, componentInfo: React.ErrorInfo) {
|
||||
componentDidCatch(error: Error, componentInfo: ErrorInfo) {
|
||||
console.error("ERROR >>>", error);
|
||||
ErrorUtils.dispatchException(error, {
|
||||
componentInfo,
|
||||
@@ -36,7 +36,7 @@ export default class ErrorBoundary extends React.PureComponent<Props, State> {
|
||||
window.history.back();
|
||||
};
|
||||
|
||||
renderErrorUi = (): React.ReactNode => {
|
||||
renderErrorUi = (): ReactNode => {
|
||||
const { errorId } = this.state;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user