This is not a commit
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import '../styles/globals.css'
|
import '../styles/globals.css'
|
||||||
import { SessionProvider } from "next-auth/react"
|
import { SessionProvider } from "next-auth/react"
|
||||||
|
import Head from "next/head";
|
||||||
|
|
||||||
function MyApp({
|
function MyApp({
|
||||||
Component,
|
Component,
|
||||||
@@ -7,6 +8,10 @@ function MyApp({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<SessionProvider session={session}>
|
<SessionProvider session={session}>
|
||||||
|
<Head>
|
||||||
|
<meta name="description" content="Wastpol" />
|
||||||
|
<link rel="icon" href="/icon.png" />
|
||||||
|
</Head>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</SessionProvider>
|
</SessionProvider>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import styles from "../styles/Home.module.css";
|
|||||||
import Header from "./templates/header";
|
import Header from "./templates/header";
|
||||||
import Generator from "./templates/generator";
|
import Generator from "./templates/generator";
|
||||||
import Nav from "./templates/nav";
|
import Nav from "./templates/nav";
|
||||||
import Content from "./templates/content";
|
import UserTop from "./templates/userTop";
|
||||||
import Footer from "./templates/footer";
|
import Footer from "./templates/footer";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useSession, signIn, signOut } from "next-auth/react";
|
import { useSession, signIn, signOut } from "next-auth/react";
|
||||||
@@ -17,22 +17,14 @@ export default function Home() {
|
|||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Wastpol</title>
|
<title>Wastpol</title>
|
||||||
<meta name="description" content="Wastpol" />
|
|
||||||
<link rel="icon" href="/icon.png" />
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<Nav />
|
<Nav />
|
||||||
<div className="flex">
|
<UserTop session={session} />
|
||||||
<h3 className="px-3 py-2 place-self-end">
|
|
||||||
Zalogowano jako {session.user.email}
|
|
||||||
</h3>
|
|
||||||
<Button onClick={() => signOut()} className="place-self-end">
|
|
||||||
Wyloguj
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main className={styles.main}>
|
<main className="flex flex-1 flex-col justify-center items-center p-8 mx-96 mt-24 rounded-md shadow-md transition-all duration-500 hover:shadow-xl">
|
||||||
<Header />
|
<Header />
|
||||||
<Generator />
|
<Generator />
|
||||||
</main>
|
</main>
|
||||||
@@ -45,8 +37,6 @@ export default function Home() {
|
|||||||
<div className="grid place-items-center h-screen">
|
<div className="grid place-items-center h-screen">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Wastpol</title>
|
<title>Wastpol</title>
|
||||||
<meta name="description" content="Wastpol" />
|
|
||||||
<link rel="icon" href="/icon.png" />
|
|
||||||
</Head>
|
</Head>
|
||||||
<div className="flex flex-col justify-center">
|
<div className="flex flex-col justify-center">
|
||||||
<h2 className="p-2">Nie zalogowano</h2>
|
<h2 className="p-2">Nie zalogowano</h2>
|
||||||
|
|||||||
16
pages/templates/userTop.js
Normal file
16
pages/templates/userTop.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import { Pane, Button } from "evergreen-ui";
|
||||||
|
import { signOut } from "next-auth/react";
|
||||||
|
|
||||||
|
export default function userTop({session}) {
|
||||||
|
return (
|
||||||
|
<Pane display="flex">
|
||||||
|
<h3 className="px-3 py-2 place-self-end">
|
||||||
|
Zalogowano jako {session.user.email}
|
||||||
|
</h3>
|
||||||
|
<Button onClick={() => signOut()} className="place-self-end">
|
||||||
|
Wyloguj
|
||||||
|
</Button>
|
||||||
|
</Pane>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user