next.js/test/e2e/switchable-runtime/utils/runtime.js
runtime.js15 lines399 B
export default function Runtime() {
  let runtime

  if (typeof window !== 'undefined') {
    // We have to make sure it matches the existing markup when hydrating.
    runtime = document.getElementById('__runtime').textContent
  } else {
    runtime =
      'Runtime: ' +
      (process.version ? `Node.js ${process.version}` : 'Edge/Browser')
  }

  return <span id="__runtime">{runtime}</span>
}
Quest for Codev2.0.0
/
SIGN IN