Organize directories
This commit is contained in:
parent
8a91c9b89b
commit
4898382f78
433 changed files with 0 additions and 0 deletions
27
apps/metamigo-frontend/pages/login.tsx
Normal file
27
apps/metamigo-frontend/pages/login.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { Button } from "@material-ui/core";
|
||||
import { signIn, signOut, useSession } from "next-auth/react";
|
||||
|
||||
export default function myComponent() {
|
||||
const { data: session } = useSession();
|
||||
|
||||
return (
|
||||
<>
|
||||
{!session && (
|
||||
<>
|
||||
Not signed in <br />
|
||||
<Button variant="contained" onClick={signIn as any}>
|
||||
Sign in
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
{session && (
|
||||
<>
|
||||
Signed in as {session.user?.email} <br />
|
||||
<Button variant="contained" onClick={signOut as any}>
|
||||
Sign out
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue