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;