From 9f0dd2e4979ad24edbb32ecdc961517b46bb0c70 Mon Sep 17 00:00:00 2001 From: bartwr Date: Tue, 4 Jun 2024 11:53:56 +0200 Subject: [PATCH] Add "Opwaarderen stallingstegoed" link to Login screen --- src/pages/login.tsx | 266 ++++++++++++++++++++++---------------------- 1 file changed, 134 insertions(+), 132 deletions(-) diff --git a/src/pages/login.tsx b/src/pages/login.tsx index acc0da4..b5f1e78 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -16,50 +16,50 @@ import Styles from "./login.module.css"; import { NextPage } from "next/types"; const Login: NextPage = () => { - const emailRef = useRef(null); - const passwordRef = useRef(null); - - const router = useRouter() - const error = useQueryParam("error")[0]; - - const onSignIn = async (e: any) => { - e.preventDefault(); - - if ( - emailRef.current && emailRef.current.value !== '' && - passwordRef.current && passwordRef.current.value !== '' - ) { - // console.log('signing in with magic link') - // signIn("email", { - // email: emailRef.current.value.trim(), - // // password: passwordRef.current.value, - // // callbackUrl: "/", - // }); - signIn("credentials", { - email: emailRef.current.value.trim(), - password: passwordRef.current.value, - callbackUrl: "/", - }); - } else { - alert('no email of password given'); - } - }; - - const allowLogin = emailRef.current?.value !== '' && passwordRef.current?.value !== ''; - - return ( - <> - - - Login - VeiligStallen - - -
- - - -
-
(null); + const passwordRef = useRef(null); + + const router = useRouter() + const error = useQueryParam("error")[0]; + + const onSignIn = async (e: any) => { + e.preventDefault(); + + if ( + emailRef.current && emailRef.current.value !== '' && + passwordRef.current && passwordRef.current.value !== '' + ) { + // console.log('signing in with magic link') + // signIn("email", { + // email: emailRef.current.value.trim(), + // // password: passwordRef.current.value, + // // callbackUrl: "/", + // }); + signIn("credentials", { + email: emailRef.current.value.trim(), + password: passwordRef.current.value, + callbackUrl: "/", + }); + } else { + alert('no email of password given'); + } + }; + + const allowLogin = emailRef.current?.value !== '' && passwordRef.current?.value !== ''; + + return ( + <> + + + Login - VeiligStallen + + +
+ + + +
+
{ flex flex-wrap `} - style={{ - width: '1000px', - maxWidth: '90%' - }}> -
- -
-
+
+
-
- -
-
- -
- VeiligStallen logo - Log in met je account -
-
- -
- -
- -
- -
- -
-
- {/* + > +
+ +
+ + +
+ VeiligStallen logo + Log in met je account +
+
+ +
+ +
+ +
+ +
+ +
+
+ {/* Ingelogd blijven */} -
-
- -
-
- -
- Nog geen account? - Registreren - -
- - - - -
-
- -
-
- - ); +
+
+ +
+
+ +
+ Nog geen account? + Registreren + +
+ + + + +
+
+ +
+ + + ); }; export default Login;