✨ add - nouvelles pages et modification du css

feature/page-admin
Eric 4 years ago
parent 50d64b513b
commit f1d1aa30d7

@ -7,8 +7,13 @@ type Props = {
children?: React.ReactNode; children?: React.ReactNode;
}; };
const layoutStyle = {
height: "100vh"
}
const Layout = ({ children }: Props) => const Layout = ({ children }: Props) =>
<div> <div style={layoutStyle}>
<NavBar /> <NavBar />
<Content children={children} /> <Content children={children} />
<Footer /> <Footer />

@ -33,7 +33,6 @@ const options = {
secret: process.env.SECRET, secret: process.env.SECRET,
callbacks: { callbacks: {
async session({ session, user }) { async session({ session, user }) {
const getCurrentUser = await prisma.user.findMany({ const getCurrentUser = await prisma.user.findMany({
where: { email: session.user.email }, where: { email: session.user.email },
}) })
@ -43,5 +42,11 @@ const options = {
return session return session
} }
}, },
error: '/error', pages: {
// signIn: '/auth/signin',
// signOut: '/auth/signout',
// error: '/auth/error', // Error code passed in query string as ?error=
verifyRequest: '/verify-request', // (used for check email message)
// newUser: '/auth/new-user' // New users will be directed here on first sign in (leave the property out if not of interest)
}
} }

@ -0,0 +1,61 @@
import React, { useEffect } from "react";
import prisma from '../lib/prisma'
import Image from 'next/image';
import * as Yup from 'yup';
import Head from "next/head";
import { getCsrfToken, signIn, useSession } from "next-auth/react";
import { yupResolver } from "@hookform/resolvers/yup";
import { useForm } from "react-hook-form";
import { AiOutlineCheck } from 'react-icons/ai'
import Router from "next/router";
import style from '../styles/Connexion.module.css';
import imageConnexion from '../public/images/connexion_image.png'
import Link from "next/link";
import { GrValidate } from 'react-icons/gr'
import { toast } from "react-toastify";
import { Token } from "nodemailer/lib/xoauth2";
import { isGeneratorFunction } from "util/types";
const VerifyRequest = () => {
//va rediriger après 3 seconde
useEffect(() => {
setTimeout(() => {
Router.push("/")
}, 3000)
}, [])
return (
<>
<Head>
<title>Page Confirmation email</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
</Head>
<div className={`${style['bloc-content']} col-12 col-lg-6`}>
<h1 className="fw-light">Un email a été envoyé</h1>
<GrValidate size={100} />
<div className="d-grid mt-4">
<button onClick={() => Router.push("/")} type="button" className={`btn btn-primary`}>
Cliquez ici si vous n'êtes pas rediriger à l'accueil
</button>
</div>
</div >
</>)
};
export default VerifyRequest;

@ -11,10 +11,4 @@
.imageWrapper { .imageWrapper {
display: block; display: block;
}
.connexion {
position: absolute;
top: 0;
right: 0;
} }

@ -5,6 +5,7 @@ body {
margin: 0; margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-size: small;
} }
a, a,

Loading…
Cancel
Save