rsnext/examples/with-userbase/pages/index.js
Allen Hai 0c6ee2c760
Add userbase example (#12150)
* add userbase example

* update readme and add now.json with build.env

* update deploy button import path for testing

* update readme

* update readme with canary tree path for deploy button

* remove prepopulated test username + password

* Apply lint-fix

* add deployed demo link

* remove merge conflict arrows

* fix lint errors

* run yarn lint-fix

* add .env.example and update readme with config steps

* add dotenv and update next.config.js

Co-authored-by: Matthew Sweeney <mail@msweeneydev.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-04-23 19:56:42 -05:00

18 lines
377 B
JavaScript

import TodoForm from '../components/todo-form'
function Index({ user }) {
if (user) {
return (
<div className="w-4/5 md:w-1/2 mx-auto">
<h3 className="font-bold text-4xl">
Welcome, <span className="bg-yellow-400">{user.username}</span>!
</h3>
<TodoForm />
</div>
)
} else {
return null
}
}
export default Index