diff --git a/@/components/ui/card.jsx b/@/components/ui/card.jsx index 7f451ec..4445f33 100644 --- a/@/components/ui/card.jsx +++ b/@/components/ui/card.jsx @@ -32,12 +32,14 @@ const CardTitle = React.forwardRef(({ className, ...props }, ref) => ( )); CardTitle.displayName = "CardTitle"; -const CardDescription = React.forwardRef(({ className, ...props }, ref) => ( -

( +

+ > + {children} +
)); CardDescription.displayName = "CardDescription"; diff --git a/app/(auth)/layout.jsx b/app/(auth)/layout.jsx new file mode 100644 index 0000000..05bf4c3 --- /dev/null +++ b/app/(auth)/layout.jsx @@ -0,0 +1,21 @@ +import Image from "next/image"; + +export default function AuthLayout({ children }) { + return ( +
+
+ +

+ Sanity Gaming +

+
+
{children}
+
+ ); +} diff --git a/app/(auth)/sign-in/page.jsx b/app/(auth)/sign-in/page.jsx index 03e0554..3e817ed 100644 --- a/app/(auth)/sign-in/page.jsx +++ b/app/(auth)/sign-in/page.jsx @@ -29,6 +29,7 @@ import { import { FaDiscord, FaGoogle } from "react-icons/fa"; import { Loader2 } from "lucide-react"; import { delay } from "framer-motion"; +import Image from "next/image"; export default function SignInForm() { const router = useRouter(); @@ -53,16 +54,19 @@ export default function SignInForm() { }); if (result?.error) { - console.error('Sign in error:', result.error); + console.error("Sign in error:", result.error); toast({ title: "Error", - description: result.error === "CredentialsSignin" ? "Invalid email or password" : result.error, + description: + result.error === "CredentialsSignin" + ? "Invalid email or password" + : result.error, variant: "destructive", }); } else if (result?.url) { router.push("/dashboard"); } else { - console.error('Unexpected result:', result); + console.error("Unexpected result:", result); toast({ title: "Error", description: "An unexpected error occurred", @@ -70,7 +74,7 @@ export default function SignInForm() { }); } } catch (error) { - console.error('Sign in error:', error); + console.error("Sign in error:", error); toast({ title: "Error", description: "An unexpected error occurred", @@ -91,16 +95,24 @@ export default function SignInForm() { return (
-
-
- - - +
+
+ + + + +

Sign in to Sanity Gaming

+

+ Welcome back! Please sign in to continue. +

+
-
@@ -109,10 +121,13 @@ export default function SignInForm() { control={form.control} render={({ field }) => ( - + Email or Username - + )} @@ -123,54 +138,63 @@ export default function SignInForm() { control={form.control} render={({ field }) => ( - Password - + + Password + + )} /> - - -
-
-
-
OR
-
-
+
+
+
or
+
+
+
- -
- Not a member yet?{" "} - - Sign up - -
+
+
+ Not a member yet?{" "} + + Sign up +
diff --git a/app/(auth)/sign-up/page.jsx b/app/(auth)/sign-up/page.jsx index 5eba13b..e20c6bb 100644 --- a/app/(auth)/sign-up/page.jsx +++ b/app/(auth)/sign-up/page.jsx @@ -25,10 +25,11 @@ import { } from "../../../@/components/ui/card"; import { useToast } from "../../../@/components/ui/use-toast"; -import axios from "axios" +import axios from "axios"; import { Loader2 } from "lucide-react"; import { useRouter } from "next/navigation"; import { signUpSchema } from "../../../model/Schema/signUpSchema"; +import Image from "next/image"; const Page = () => { const [username, setUsername] = useState(""); @@ -103,101 +104,130 @@ const Page = () => { return (
-
-
- - - - Welcome to Sanity - - - Sign up to start your gaming adventure - - -
- - - ( - - Username - { - field.onChange(e); - debouncedUsername(e.target.value); - }} - /> - {isCheckingUsername && } - {!isCheckingUsername && usernameMessage && ( -

- {usernameMessage} -

+
+
+ + + + +

Create an account.

+

+ Welcome! Please fill the details to get started. +

+
+
+ + + + ( + + + Username + + { + field.onChange(e); + debouncedUsername(e.target.value); + }} + /> + {isCheckingUsername && ( + + )} + {!isCheckingUsername && usernameMessage && ( +

+ {usernameMessage} +

+ )} + +
)} - - - )} - /> - - ( - - Email - - - - )} - /> - - ( - - Password - - - - )} - /> -
- - - -
- Already a member?{" "} - - Sign in - -
-
- - -
-
-
+ /> + + ( + + + Email + + + + + )} + /> + + ( + + + Password + + + + + )} + /> +
+ + + +
+ Already a member?{" "} + + Sign in + +
+
+ + +
+
+
); }; diff --git a/app/(auth)/verify/[username]/page.jsx b/app/(auth)/verify/[username]/page.jsx index c1ceb2c..e6cf711 100644 --- a/app/(auth)/verify/[username]/page.jsx +++ b/app/(auth)/verify/[username]/page.jsx @@ -25,6 +25,7 @@ import { CardHeader, CardTitle, } from "../../../../@/components/ui/card"; +import Image from "next/image"; const VerifyAccount = () => { const router = useRouter(); @@ -61,42 +62,57 @@ const VerifyAccount = () => { return (
-
-
- - - - Verify your account - - - Enter your verification code - - -
- - - ( - - Verification Code - - - - - - )} - /> - - - - -
- -
-
-
+
+
+ + + + +

Verify your account.

+
+
+
+ + + ( + + + Verification Code + + + + + + + )} + /> + + + + +
+ +
+
+
); }; diff --git a/public/assets/grad1.svg b/public/assets/grad1.svg new file mode 100644 index 0000000..bac9444 --- /dev/null +++ b/public/assets/grad1.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tsconfig.json b/tsconfig.json index 7301805..954d174 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,9 +17,7 @@ "name": "next" } ], - "types": [ - "react-reconciler" - ] + "types": ["react-reconciler"] }, "include": [ "next-env.d.ts", @@ -28,7 +26,10 @@ "**/*.tsx", "middleware.ts", "app/(auth)/sign-in/page.jsx", - "prisma/seed.js" -, "app/api/auth/[...nextauth]/route.js", "app/api/auth/[...nextauth]/options.js" ], + "prisma/seed.js", + "app/api/auth/[...nextauth]/route.js", + "app/api/auth/[...nextauth]/options.js", + "app/(auth)/layout.jsx" + ], "exclude": ["node_modules"] }