diff --git a/invokeai/frontend/web/src/app/components/AppErrorBoundaryFallback.tsx b/invokeai/frontend/web/src/app/components/AppErrorBoundaryFallback.tsx index 7f1f825ba3..ab1aeefeca 100644 --- a/invokeai/frontend/web/src/app/components/AppErrorBoundaryFallback.tsx +++ b/invokeai/frontend/web/src/app/components/AppErrorBoundaryFallback.tsx @@ -1,4 +1,5 @@ import { Button, Flex, Heading, Link, Text } from '@invoke-ai/ui-library'; +import { useAppSelector } from 'app/store/storeHooks'; import { toast } from 'features/toast/toast'; import newGithubIssueUrl from 'new-github-issue-url'; import { memo, useCallback, useMemo } from 'react'; @@ -13,6 +14,7 @@ type Props = { const AppErrorBoundaryFallback = ({ error, resetErrorBoundary }: Props) => { const { t } = useTranslation(); + const isLocal = useAppSelector((s) => s.config.isLocal); const handleCopy = useCallback(() => { const text = JSON.stringify(serializeError(error), null, 2); @@ -23,16 +25,19 @@ const AppErrorBoundaryFallback = ({ error, resetErrorBoundary }: Props) => { }); }, [error, t]); - const url = useMemo( - () => - newGithubIssueUrl({ + const url = useMemo(() => { + if (isLocal) { + return newGithubIssueUrl({ user: 'invoke-ai', repo: 'InvokeAI', template: 'BUG_REPORT.yml', title: `[bug]: ${error.name}: ${error.message}`, - }), - [error.message, error.name] - ); + }); + } else { + return 'https://support.invoke.ai/support/tickets/new'; + } + }, [error.message, error.name, isLocal]); + return (