Created
January 16, 2020 15:19
-
-
Save ernestofreyreg/a93bee6e401a1abe74768e90b18effc9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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