1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-babel-macros/pages/index.js

22 lines
381 B
JavaScript
Raw Normal View History

2017-07-14 21:22:25 +00:00
import React from 'react'
import preval from 'preval.macro'
const whoami = preval`
const userInfo = require('os').userInfo()
module.exports = userInfo.username
`
export default WhoAmI
function WhoAmI () {
return (
<div style={{display: 'flex', justifyContent: 'center'}}>
<h1>
<pre>
whoami: {whoami}
</pre>
</h1>
</div>
)
}