Skip to content

Instantly share code, notes, and snippets.

@ernestofreyreg
Created January 16, 2020 15:19
Show Gist options
  • Save ernestofreyreg/a93bee6e401a1abe74768e90b18effc9 to your computer and use it in GitHub Desktop.
Save ernestofreyreg/a93bee6e401a1abe74768e90b18effc9 to your computer and use it in GitHub Desktop.
import * as React from 'react'
import { NextPage } from 'next'
import { requireUser, useAuth0 } from '../lib/auth0-spa'
import Link from 'next/link'
import NavigationBar from '../components/NavigationBar'
interface Props {}
const DashboardPage: NextPage<Props> = () => {
const { user } = useAuth0()
return (
<div>
{user && (
<div>
{user.nickname}{' '}
<Link href='/'>
<a>Home</a>
</Link>
<div>
<img src={user.picture} alt={user.nickname} />
</div>
</div>
)}
<NavigationBar />
</div>
)
}
export default requireUser(DashboardPage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment