Skip to content

Commit 1ce1b81

Browse files
authored
[docs-infra] Skip adding markdown link in prod error page (#3266)
1 parent 8a30f2a commit 1ce1b81

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

docs/src/app/(public)/(content)/production-error/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import ErrorDisplay from './ErrorDisplay';
33

44
# Production error #<ErrorCode />
55

6-
<Subtitle>Explanation for minified production error message.</Subtitle>
6+
<Subtitle skipMarkdownLink>Explanation for minified production error message.</Subtitle>
77
<Meta
88
name="description"
99
content="In the production build, error messages are minified to keep your application lightweight."

docs/src/components/Subtitle/Subtitle.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import * as React from 'react';
22
import clsx from 'clsx';
33
import { MarkdownLink } from './MarkdownLink';
44

5-
export function Subtitle({ className, ...props }: React.ComponentProps<'p'>) {
5+
export function Subtitle({
6+
className,
7+
skipMarkdownLink = false,
8+
...props
9+
}: React.ComponentProps<'p'> & { skipMarkdownLink?: boolean }) {
610
return (
711
<div
812
className={clsx(
@@ -11,7 +15,7 @@ export function Subtitle({ className, ...props }: React.ComponentProps<'p'>) {
1115
)}
1216
>
1317
<p {...props} />
14-
<MarkdownLink />
18+
{!skipMarkdownLink && <MarkdownLink />}
1519
</div>
1620
);
1721
}

0 commit comments

Comments
 (0)