import { Alert, Button } from 'antd'; import { FC } from 'react'; export type ComponentErrorProps = { message?: string; componentName: string; details?: string; retryFunction?: () => void; }; const openBugReport = () => { window.open( 'https://github.com/owncast/owncast/issues/new?assignees=&labels=&template=bug-report-feature-request.yml', '_blank', ); }; const ErrorContent = ({ message, componentName, details, canRetry, }: { message: string; componentName: string; details: string; canRetry: boolean; }) => (

There was an unexpected error. It would be appreciated if you would report this so it can be fixed in the future.

{!!canRetry && (

You may optionally retry, however functionality might not work as expected.

)}
{message && `Error: ${message}`}
Component: {componentName}
{details && details}
); export const ComponentError: FC = ({ message, componentName, details, retryFunction, }: ComponentErrorProps) => ( type="error" action={ <> {retryFunction && ( )} } /> );