✨ add - nouvelles pages et modification du css
This commit is contained in:
1 parent
50d64b513b
commit
f1d1aa30d7
5 files changed
+75
-9
No files matched your search
@@ -7,8 +7,13 @@ type Props = {
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
|
||||
const layoutStyle = {
|
||||
height: "100vh"
|
||||
}
|
||||
|
||||
const Layout = ({ children }: Props) =>
|
||||
<div>
|
||||
<div style={layoutStyle}>
|
||||
<NavBar />
|
||||
<Content children={children} />
|
||||
<Footer />
|
||||
|
||||
@@ -33,7 +33,6 @@ const options = {
|
||||
secret: process.env.SECRET,
|
||||
callbacks: {
|
||||
async session({ session, user }) {
|
||||
|
||||
const getCurrentUser = await prisma.user.findMany({
|
||||
where: { email: session.user.email },
|
||||
})
|
||||
@@ -43,5 +42,11 @@ const options = {
|
||||
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;
|
||||
|
||||
|
||||
@@ -12,9 +12,3 @@
|
||||
.imageWrapper {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.connexion {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
@@ -5,6 +5,7 @@ body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
a,
|
||||
|
||||
Reference in new issue
Block a user