File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,9 @@ const ErrorStack: FC<ErrorStackProps> = ({ error }) => {
128
128
</ p >
129
129
{ error . stack && (
130
130
< pre className = "m-0 py-2 px-0 overflow-x-auto text-xs" >
131
- < code data-testid = "code" > { error . stack } </ code >
131
+ < code data-testid = "code" data-chromatic = "ignore" >
132
+ { error . stack }
133
+ </ code >
132
134
</ pre >
133
135
) }
134
136
</ >
Original file line number Diff line number Diff line change
1
+ import isChromatic from "chromatic/isChromatic" ;
1
2
import type { FC } from "react" ;
2
3
import { Helmet } from "react-helmet-async" ;
3
4
import { pageTitle } from "utils/page" ;
4
5
import { CliInstallPageView } from "./CliInstallPageView" ;
5
6
6
7
export const CliInstallPage : FC = ( ) => {
8
+ const origin = isChromatic ( ) ? "https://example.com" : window . location . origin ;
9
+
7
10
return (
8
11
< >
9
12
< Helmet >
10
13
< title > { pageTitle ( "Install the Coder CLI" ) } </ title >
11
14
</ Helmet >
12
- < CliInstallPageView />
15
+ < CliInstallPageView origin = { origin } />
13
16
</ >
14
17
) ;
15
18
} ;
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import { CliInstallPageView } from "./CliInstallPageView";
4
4
const meta : Meta < typeof CliInstallPageView > = {
5
5
title : "pages/CliInstallPage" ,
6
6
component : CliInstallPageView ,
7
+ args : {
8
+ origin : "https://example.com" ,
9
+ } ,
7
10
} ;
8
11
9
12
export default meta ;
Original file line number Diff line number Diff line change @@ -4,9 +4,11 @@ import { Welcome } from "components/Welcome/Welcome";
4
4
import type { FC } from "react" ;
5
5
import { Link as RouterLink } from "react-router-dom" ;
6
6
7
- export const CliInstallPageView : FC = ( ) => {
8
- const origin = location . origin ;
7
+ type CliInstallPageViewProps = {
8
+ origin : string ;
9
+ } ;
9
10
11
+ export const CliInstallPageView : FC < CliInstallPageViewProps > = ( { origin } ) => {
10
12
return (
11
13
< div css = { styles . container } >
12
14
< Welcome > Install the Coder CLI</ Welcome >
@@ -18,7 +20,6 @@ export const CliInstallPageView: FC = () => {
18
20
19
21
< CodeExample
20
22
css = { { maxWidth : "100%" } }
21
- data-chromatic = "ignore"
22
23
code = { `curl -fsSL ${ origin } /install.sh | sh` }
23
24
secret = { false }
24
25
/>
You can’t perform that action at this time.
0 commit comments