fix : hiding upgrade banner on unrelated errors (#1667)
This PR solves the issue #1666 To solve this i removed the upgrade link from the general case since errors related to pro mode are already handled in the specific if-blocks <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Hide the Dyad Pro upgrade banner on termination errors to reduce confusion. The generic upgrade link in ChatErrorBox is now suppressed when the error includes "TypeError: terminated" and only shows when Pro is disabled otherwise. <sup>Written for commit 1edf665. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
This commit is contained in:
committed by
GitHub
parent
8ce23cd175
commit
d8a0c6e163
@@ -99,7 +99,7 @@ export function ChatErrorBox({
|
|||||||
<ChatErrorContainer onDismiss={onDismiss}>
|
<ChatErrorContainer onDismiss={onDismiss}>
|
||||||
{error}
|
{error}
|
||||||
<div className="mt-2 space-y-2 space-x-2">
|
<div className="mt-2 space-y-2 space-x-2">
|
||||||
{!isDyadProEnabled && (
|
{!isDyadProEnabled && !error.includes("TypeError: terminated") && (
|
||||||
<ExternalLink
|
<ExternalLink
|
||||||
href="https://dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=general-error"
|
href="https://dyad.sh/pro?utm_source=dyad-app&utm_medium=app&utm_campaign=general-error"
|
||||||
variant="primary"
|
variant="primary"
|
||||||
@@ -107,7 +107,6 @@ export function ChatErrorBox({
|
|||||||
Upgrade to Dyad Pro
|
Upgrade to Dyad Pro
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<ExternalLink href="https://www.dyad.sh/docs/faq">
|
<ExternalLink href="https://www.dyad.sh/docs/faq">
|
||||||
Read docs
|
Read docs
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
|
|||||||
Reference in New Issue
Block a user