|
| 1 | +import { EnvelopeIcon } from "@heroicons/react/20/solid"; |
1 | 2 | import { |
2 | 3 | exceptionEventEnhancer, |
3 | 4 | isExceptionSpanEvent, |
4 | 5 | type ExceptionEventProperties, |
5 | 6 | type SpanEvent as OtelSpanEvent, |
6 | 7 | } from "@trigger.dev/core/v3"; |
7 | 8 | import { CodeBlock } from "~/components/code/CodeBlock"; |
| 9 | +import { Feedback } from "~/components/Feedback"; |
| 10 | +import { Button } from "~/components/primitives/Buttons"; |
8 | 11 | import { Callout } from "~/components/primitives/Callout"; |
9 | 12 | import { DateTimeAccurate } from "~/components/primitives/DateTime"; |
10 | 13 | import { Header2, Header3 } from "~/components/primitives/Headers"; |
@@ -75,11 +78,26 @@ export function SpanEventError({ |
75 | 78 | titleClassName="text-rose-500" |
76 | 79 | /> |
77 | 80 | {enhancedException.message && <Callout variant="error">{enhancedException.message}</Callout>} |
78 | | - {enhancedException.link && ( |
79 | | - <Callout variant="docs" to={enhancedException.link.href}> |
80 | | - {enhancedException.link.name} |
81 | | - </Callout> |
82 | | - )} |
| 81 | + {enhancedException.link && |
| 82 | + (enhancedException.link.magic === "CONTACT_FORM" ? ( |
| 83 | + <Feedback |
| 84 | + button={ |
| 85 | + <Button |
| 86 | + variant="tertiary/medium" |
| 87 | + LeadingIcon={EnvelopeIcon} |
| 88 | + leadingIconClassName="text-blue-400" |
| 89 | + fullWidth |
| 90 | + textAlignLeft |
| 91 | + > |
| 92 | + {enhancedException.link.name} |
| 93 | + </Button> |
| 94 | + } |
| 95 | + /> |
| 96 | + ) : ( |
| 97 | + <Callout variant="docs" to={enhancedException.link.href}> |
| 98 | + {enhancedException.link.name} |
| 99 | + </Callout> |
| 100 | + ))} |
83 | 101 | {enhancedException.stacktrace && ( |
84 | 102 | <CodeBlock |
85 | 103 | showCopyButton={false} |
|
0 commit comments