Files
JJ KasperandGitHub 157399b353 Handle more cases with env inlining (#68590)
This ensures we are able to properly replace even when an env variable
value wasn't initially provided and also ensures an env that is
interpolated in a string properly replaces. We don't use the stringified
version of `process.env` as that can cause issues with interpolation and
such.
2024-08-06 11:35:57 -07:00

24 lines
669 B
JavaScript

import React from 'react'
import Link from 'next/link'
import dynamic from 'next/dynamic'
import styles from '../styles/shared.module.css'
const Button = dynamic(() =>
import('../components/button/button').then((mod) => mod.Button)
)
export default function Page() {
return (
<>
<p id="hello" className={styles.content}>
hello from pages/index
</p>
<Link href="/dashboard">Dashboard</Link>
<p id="react-version">{React.version}</p>
<Button>Click me!</Button>
<span id="my-env">{process.env.NEXT_PUBLIC_TEST_ID}</span>
<span id="my-other-env">{`${process.env.NEXT_PUBLIC_TEST_ID}-suffix`}</span>
</>
)
}