From 28c17c0ebe857b15e8721269d4f04d754f3c94da Mon Sep 17 00:00:00 2001 From: Web Spinner Bot Date: Sun, 17 Dec 2023 04:43:31 +0000 Subject: [PATCH] Create page: Sign Up --- src/app/auth/page.tsx | 18 ++++++++++++ src/components/AuthForm.tsx | 35 +++++++++++++++++++++++ src/components/CreateAccountLink.tsx | 16 +++++++++++ src/components/SignInButton.tsx | 14 +++++++++ src/components/SignInWithGoogleButton.tsx | 15 ++++++++++ 5 files changed, 98 insertions(+) create mode 100644 src/app/auth/page.tsx create mode 100644 src/components/AuthForm.tsx create mode 100644 src/components/CreateAccountLink.tsx create mode 100644 src/components/SignInButton.tsx create mode 100644 src/components/SignInWithGoogleButton.tsx diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx new file mode 100644 index 0000000..8e933ad --- /dev/null +++ b/src/app/auth/page.tsx @@ -0,0 +1,18 @@ +import { functionComponent } from 'react'; +import AuthForm from '@/components/AuthForm'; + +const AuthPage: functionComponent = () => { + const handleSignInSubmit = (username: string, password: string) => { + // Logic for handling sign in with username and password + }; + + return ( +
+
+ +
+
+ ); +}; + +export default AuthPage; diff --git a/src/components/AuthForm.tsx b/src/components/AuthForm.tsx new file mode 100644 index 0000000..5d17e2e --- /dev/null +++ b/src/components/AuthForm.tsx @@ -0,0 +1,35 @@ +import { functionComponent } from 'react'; +import Input from '@/components/ui/input'; +import Label from '@/components/ui/label'; +import SignInButton from '@/components/auth/SignInButton'; +import SignInWithGoogleButton from '@/components/auth/SignInWithGoogleButton'; +import CreateAccountLink from '@/components/auth/CreateAccountLink'; + +interface AuthFormProps { + onSubmit: (username: string, password: string) => void; +} + +const AuthForm: functionComponent = ({ onSubmit }) => { + return ( +
{ + e.preventDefault(); + const username = e.target.elements.username.value; + const password = e.target.elements.password.value; + onSubmit(username, password); + }}> +
+
+
+
+ + + + + ); +}; + +export default AuthForm; diff --git a/src/components/CreateAccountLink.tsx b/src/components/CreateAccountLink.tsx new file mode 100644 index 0000000..6cf8103 --- /dev/null +++ b/src/components/CreateAccountLink.tsx @@ -0,0 +1,16 @@ +import { functionComponent } from 'react'; +import Link from 'next/link'; + +const CreateAccountLink: functionComponent = () => { + return ( + + ); +}; + +export default CreateAccountLink; diff --git a/src/components/SignInButton.tsx b/src/components/SignInButton.tsx new file mode 100644 index 0000000..b708f03 --- /dev/null +++ b/src/components/SignInButton.tsx @@ -0,0 +1,14 @@ +import { functionComponent } from 'react'; +import Button from '@/components/ui/button'; + +const SignInButton: functionComponent = () => { + return ( +
+ +
+ ); +}; + +export default SignInButton; diff --git a/src/components/SignInWithGoogleButton.tsx b/src/components/SignInWithGoogleButton.tsx new file mode 100644 index 0000000..3a7ca63 --- /dev/null +++ b/src/components/SignInWithGoogleButton.tsx @@ -0,0 +1,15 @@ +import { functionComponent } from 'react'; +import Button from '@/components/ui/button'; + +const SignInWithGoogleButton: functionComponent = () => { + return ( +
+ +
+ ); +}; + +export default SignInWithGoogleButton;