Skip to content

Commit 0dd5dfa

Browse files
committed
ci: don't SSR private env var
1 parent c43522a commit 0dd5dfa

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

demos/default/pages/env.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,24 @@ function EnvTest() {
66
<div>
77
<h1>Environment Variables</h1>
88
<a href="https://nextjs.org/docs/basic-features/environment-variables">Read Docs</a>
9-
<p>By default environment variables are only available in the Node.js environment, meaning they won&apos;t be exposed to the browser.</p>
109
<p>
11-
<code>NEXT_PUBLIC_</code> environment variables are available in the browser, and can be used to configure the application.
10+
By default environment variables are only available in the Node.js environment, meaning they won&apos;t be
11+
exposed to the browser.
12+
</p>
13+
<p>
14+
<code>NEXT_PUBLIC_</code> environment variables are available in the browser, and can be used to configure the
15+
application.
16+
</p>
17+
<p>
18+
✅ Public Environment token found:{' '}
19+
<code>{process.env.NEXT_PUBLIC_GREETINGS || 'NOT FOUND (something went wrong)'}</code>
20+
</p>
21+
<p>
22+
❌ Private Environment token should not be found:{' '}
23+
<code>{(typeof document !== 'undefined' && process.env.TEST_ENV_VAR) || 'Everything worked'}</code>
1224
</p>
13-
<p>✅ Public Environment token found: <code>{process.env.NEXT_PUBLIC_GREETINGS || 'NOT FOUND (something went wrong)'}</code></p>
14-
<p>❌ Private Environment token should not be found: <code>{process.env.TEST_ENV_VAR || 'Everything worked'}</code></p>
1525
</div>
1626
)
1727
}
1828

19-
export default EnvTest
29+
export default EnvTest

0 commit comments

Comments
 (0)