@@ -19,6 +19,7 @@ export default function Welcome() {
19
19
const selectedTab = tabParam ? ( tabParam === 'popup' ? 'popup' : 'iframe' ) : 'iframe' ;
20
20
const [ , forceUpdate ] = useState ( 0 ) ;
21
21
const theme = ( localStorage . getItem ( THEME_STORAGE_KEY ) as ThemeMode ) ?? 'dark' ;
22
+ const IS_RUNNING_ON_VERCEL = process . env . VERCEL === '1' ;
22
23
23
24
const embedUrl = useMemo ( ( ) => {
24
25
const url = new URL ( '/embed' , window . location . origin ) ;
@@ -102,7 +103,7 @@ export default function Welcome() {
102
103
< h3 className = "sr-only text-lg font-semibold" > IFrame Style</ h3 >
103
104
< div >
104
105
< h4 className = "text-fg0 mb-1 font-semibold" > Embed code</ h4 >
105
- < pre className = "border-separator2 bg-bg2 overflow-auto rounded-md border px-2 py-1" >
106
+ < pre className = "border-separator2 bg-bg2 scrollbar-custom overflow-auto rounded-md border px-2 py-1" >
106
107
< code className = "font-mono" >
107
108
{ `<iframe\n src="` }
108
109
< a
@@ -132,18 +133,30 @@ export default function Welcome() {
132
133
< h3 className = "sr-only text-lg font-semibold" > Popup Style</ h3 >
133
134
< div >
134
135
< h4 className = "text-fg0 mb-1 font-semibold" > Embed code</ h4 >
135
- < pre className = "border-separator2 bg-bg2 overflow-auto rounded-md border px-2 py-1" >
136
+ < pre className = "border-separator2 bg-bg2 scrollbar-custom overflow-auto rounded-md border px-2 py-1" >
136
137
< code className = "font-mono" > { `<script src="${ embedPopupUrl } "></script>` } </ code >
137
138
</ pre >
138
- < p className = "text-fg4 my-4 text-sm" >
139
- To apply local changes, run{ ' ' }
140
- < code className = "text-fg0" > pnpm build-embed-popup-script</ code > .< br />
141
- Test your latest build at{ ' ' }
142
- < a href = "/popup" target = "_blank" rel = "noopener noreferrer" className = "underline" >
143
- { popupTestUrl }
144
- </ a >
145
- .
146
- </ p >
139
+ { /* hide build/test instructions in sandbox environment on Vercel */ }
140
+ { ! IS_RUNNING_ON_VERCEL && (
141
+ < div className = "my-4" >
142
+ < p className = "text-fg4 overflow-hidden text-sm text-ellipsis whitespace-nowrap" >
143
+ To apply local changes, run{ ' ' }
144
+ < code className = "text-fg0" > pnpm build-embed-popup-script</ code > .
145
+ </ p >
146
+ < p className = "text-fg4 overflow-hidden text-sm text-ellipsis whitespace-nowrap" >
147
+ Test your latest build at{ ' ' }
148
+ < a
149
+ href = "/popup"
150
+ target = "_blank"
151
+ rel = "noopener noreferrer"
152
+ className = "underline"
153
+ >
154
+ { popupTestUrl }
155
+ </ a >
156
+ .
157
+ </ p >
158
+ </ div >
159
+ ) }
147
160
</ div >
148
161
< div className = "flex justify-center pt-8" >
149
162
< div className = "text-fgAccent flex gap-1" >
0 commit comments