Skip to content

Commit 9d268fe

Browse files
don't show build/test instructions in sandbox environment
1 parent 7df8fa0 commit 9d268fe

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

components/welcome.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { cn } from '@/lib/utils';
1111
import EmbedPopupAgentClient from './embed-popup/agent-client';
1212
import { ThemeToggle } from './theme-toggle';
1313

14+
const IS_LOCAL_ENVIRONMENT = process.env.VERCEL === undefined;
15+
1416
export default function Welcome() {
1517
const router = useRouter();
1618
const pathname = usePathname();
@@ -135,15 +137,18 @@ export default function Welcome() {
135137
<pre className="border-separator2 bg-bg2 overflow-auto rounded-md border px-2 py-1">
136138
<code className="font-mono">{`<script src="${embedPopupUrl}"></script>`}</code>
137139
</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>
140+
{/* Dont show build/test instructions in sandbox environment */}
141+
{IS_LOCAL_ENVIRONMENT && (
142+
<p className="text-fg4 my-4 text-sm">
143+
To apply local changes, run{' '}
144+
<code className="text-fg0">pnpm build-embed-popup-script</code>.<br />
145+
Test your latest build at{' '}
146+
<a href="/popup" target="_blank" rel="noopener noreferrer" className="underline">
147+
{popupTestUrl}
148+
</a>
149+
.
150+
</p>
151+
)}
147152
</div>
148153
<div className="flex justify-center pt-8">
149154
<div className="text-fgAccent flex gap-1">

0 commit comments

Comments
 (0)