diff --git a/packages/core/client/src/schema-component/antd/error-fallback/ErrorFallback2.tsx b/packages/core/client/src/schema-component/antd/error-fallback/ErrorFallback2.tsx new file mode 100644 index 000000000..56b32accc --- /dev/null +++ b/packages/core/client/src/schema-component/antd/error-fallback/ErrorFallback2.tsx @@ -0,0 +1,50 @@ +import { Button, Result, Typography } from 'antd'; +import React, { FC } from 'react'; +import { FallbackProps, useErrorBoundary } from 'react-error-boundary'; +import { Trans, useTranslation } from 'react-i18next'; + +const { Paragraph, Text, Link } = Typography; + +export const ErrorFallback: FC = ({ error }) => { + const { resetBoundary } = useErrorBoundary(); + const { t } = useTranslation(); + + const subTitle = ( + + {'This is likely a TachyCode internals bug. Please open an issue at '} + + here + + + ); + + return ( +
+ + {t('Feedback')} + , + , + ]} + > + + + {error.stack} + + + +
+ ); +}; diff --git a/packages/core/client/src/schema-component/antd/error-fallback/index.ts b/packages/core/client/src/schema-component/antd/error-fallback/index.ts index 12bb8db1b..e7f61b61a 100644 --- a/packages/core/client/src/schema-component/antd/error-fallback/index.ts +++ b/packages/core/client/src/schema-component/antd/error-fallback/index.ts @@ -1 +1 @@ -export * from './ErrorFallback'; +export * from './ErrorFallback2';