Last active
August 18, 2022 22:01
-
-
Save SpiffGreen/87f2d0f89d35b3bf8f88aed32f16d2bb to your computer and use it in GitHub Desktop.
Next auth tutorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Link from "next/link"; | |
function LoginPage() { | |
return ( | |
<div className="bg-zinc-300 min-h-screen py-4"> | |
<div className="bg-white rounded-lg p-3 mt-4 max-w-md shadow-sm mx-auto"> | |
<div className="text-center text-2xl my-2 uppercase">Login</div> | |
<form action="/api/login" method="POST"> | |
<div className="form-group"> | |
<label htmlFor="email" className="block">Email</label> | |
<input type="text" name="email" id="email" placeholder="Enter your email" className="block w-full my-2 border border-zinc-300 rounded-sm p-2 outline-none" /> | |
</div> | |
<div className="form-group"> | |
<label htmlFor="password" className="block">Password</label> | |
<input type="password" name="password" id="password" placeholder="Enter your password" className="block w-full my-2 border border-zinc-300 rounded-sm p-2 outline-none" /> | |
</div> | |
<button type="submit" className="btn bg-black text-white rounded block my-2 p-2">Log In</button> | |
</form> | |
</div> | |
<div className="text-center mt-3 underline"> | |
<Link href="/"><a className="block">Back Home</a></Link> | |
<Link href="/signup"><a className="block">Don't have an account? Signup</a></Link> | |
</div> | |
</div> | |
) | |
} | |
export default LoginPage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment