-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6baf679
commit 7b3225a
Showing
23 changed files
with
223 additions
and
7 deletions.
There are no files selected for viewing
Empty file.
This file contains 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
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from "react"; | ||
import OAuthProviders from "./OAuthProviders"; | ||
import Link from "next/link"; | ||
|
||
const LoginForm = () => { | ||
return ( | ||
<div className="w-[25rem] overflow-hidden p-4 h-full flex justify-center flex-col"> | ||
<h1 className="text-3xl font-semibold text-left w-full mb-6"> | ||
Log Into Your Account | ||
</h1> | ||
<form action="" className="flex flex-col gap-y-6 p-3"> | ||
<input | ||
type="text" | ||
name="useremail" | ||
id="useremail" | ||
placeholder="Enter Your Email" | ||
className="border-b-2 border-gray-400 focus:border-red-500 outline-none p-2 transition" | ||
/> | ||
<input | ||
type="text" | ||
name="password" | ||
id="password" | ||
placeholder="Enter Your Password" | ||
className="border-b-2 border-gray-400 focus:border-red-500 outline-none p-2 transition" | ||
/> | ||
<button | ||
type="submit" | ||
className="bg-red-500 w-full p-2 text-white rounded-md hover:bg-red-400 transition" | ||
> | ||
Create Account | ||
</button> | ||
</form> | ||
<div className="w-full text-center">or</div> | ||
|
||
<div className="w-full p-3"> | ||
<OAuthProviders /> | ||
</div> | ||
<div className="more flex items-center justify-between w-full p-3"> | ||
<p>Already have an Account?</p> | ||
<Link | ||
href={"/auth/sign-up"} | ||
className="text-green-700 underline font-semibold font-sans" | ||
> | ||
SignUp | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LoginForm; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"use client"; | ||
// import { signIn } from "next-auth/react"; | ||
// import { redirect } from "next/dist/server/api-utils"; | ||
import {FcGoogle, FcReddit} from 'react-icons/fc' | ||
|
||
export default function OAuthButton({ auth, type }) { | ||
return ( | ||
<button | ||
type="button" | ||
className="flex items-center justify-center gap-x-2 w-full rounded-md p-4 text-sm font-semibold focus-visible:outline focus-visible:outline-2 bg-gray-200 hover:bg-gray-300" | ||
// onClick={() => { | ||
// signIn(auth?.id || ""); | ||
// }} | ||
> | ||
{auth.type === "github" ? <FcReddit size={20} /> : <FcGoogle size={20} />} | ||
{auth ? auth.name : "Loading"} | ||
</button> | ||
); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import OAuthButton from "./OAuthButton"; | ||
|
||
const OAuthProviders = () => { | ||
const Providers = [ | ||
{ name: "Continue With Google", type: "google" }, | ||
{ name: "Continue With GitHub", type: "github" }, | ||
]; | ||
return ( | ||
<div className="w-full flex flex-col items-center justify-center gap-3"> | ||
{Providers.map((provider) => { | ||
return ( | ||
<OAuthButton | ||
auth={provider} | ||
|
||
key={provider.name} | ||
/> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; | ||
|
||
export default OAuthProviders; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React from "react"; | ||
import OAuthProviders from "./OAuthProviders"; | ||
import Link from "next/link"; | ||
|
||
const SignUpForm = () => { | ||
return ( | ||
<div className="w-[25rem] overflow-hidden p-4 h-full flex justify-center flex-col"> | ||
<h1 className="text-3xl font-semibold text-left w-full mb-6"> | ||
Create An Account | ||
</h1> | ||
<form action="" className="flex flex-col gap-y-4 p-2"> | ||
<input | ||
type="text" | ||
name="useremail" | ||
id="useremail" | ||
placeholder="Enter Your Email" | ||
className="border-b-2 border-gray-400 focus:border-red-500 outline-none p-2 transition autofill:bg-none" | ||
/> | ||
<input | ||
type="text" | ||
name="phonenumber" | ||
id="phonenumber" | ||
placeholder="Enter Your Phone Number" | ||
className="border-b-2 border-gray-400 focus:border-red-500 outline-none p-2 transition" | ||
/> | ||
<input | ||
type="password" | ||
name="password" | ||
id="password" | ||
placeholder="Enter Your Password" | ||
className="border-b-2 border-gray-400 focus:border-red-500 outline-none p-2 transition" | ||
/> | ||
<button | ||
type="submit" | ||
className="bg-red-500 w-full p-2 text-white rounded-md hover:bg-red-400 transition" | ||
> | ||
Create Account | ||
</button> | ||
</form> | ||
<div className="w-full text-center">or</div> | ||
<div className="w-full p-3"> | ||
<OAuthProviders /> | ||
</div> | ||
<div className="more flex items-center justify-between w-full p-3"> | ||
<p>Already have an Account?</p> | ||
<Link | ||
href={"/auth/sign-in"} | ||
className="text-green-700 underline font-semibold font-sans" | ||
> | ||
SignIn | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SignUpForm; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Image from "next/image"; | ||
import React from "react"; | ||
import LoginForm from "../_components/LoginForm"; | ||
import Link from "next/link"; | ||
|
||
const SignIn = () => { | ||
return ( | ||
<div className="w-full h-screen flex items-center flex-row"> | ||
<div className="w-full h-full hidden md:flex items-center justify-center"> | ||
<Image | ||
height={700} | ||
width={700} | ||
src={"/images/image.png"} | ||
alt="Image-1" | ||
/> | ||
</div> | ||
<div className="h-full w-full flex items-center justify-center py-11"> | ||
<LoginForm /> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SignIn; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Image from "next/image"; | ||
import React from "react"; | ||
import SignUpForm from "../_components/SignUpForm"; | ||
|
||
const SignUp = () => { | ||
return ( | ||
<div className="w-full h-screen flex items-center flex-row"> | ||
<div className="w-full h-full hidden md:flex items-center justify-center"> | ||
<Image | ||
height={700} | ||
width={700} | ||
src={"/images/image.png"} | ||
alt="Image-1" | ||
/> | ||
</div> | ||
<div className="h-full w-full flex items-center justify-center flex-col py-11"> | ||
<SignUpForm /> | ||
|
||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SignUp; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Link from "next/link"; | ||
|
||
const SignInButton = ({ className, href, children }) => { | ||
return ( | ||
<Link href={href} className={"p-1 " + className}> | ||
{children} | ||
</Link> | ||
); | ||
}; | ||
|
||
export default SignInButton; |
This file contains 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
This file contains 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
This file contains 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
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.