From 942aac691225f4895c159a0260890ad2c576e0c9 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Thu, 22 Feb 2024 15:32:40 +0000
Subject: feature: Add support for credentials registration and sign in

---
 packages/web/app/signin/page.tsx | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

(limited to 'packages/web/app/signin/page.tsx')

diff --git a/packages/web/app/signin/page.tsx b/packages/web/app/signin/page.tsx
index 1556ff2c..f578a845 100644
--- a/packages/web/app/signin/page.tsx
+++ b/packages/web/app/signin/page.tsx
@@ -1,17 +1,23 @@
 import { PackageOpen } from "lucide-react";
 import SignInForm from "./components/SignInForm";
+import { redirect } from "next/dist/client/components/navigation";
+import { getServerAuthSession } from "@/server/auth";
 
 export default async function SignInPage() {
-  // TODO Add support for email and credential signin form
+  const session = await getServerAuthSession();
+  if (session) {
+    redirect("/");
+  }
+
   return (
-    <div className="flex min-h-screen flex-col items-center justify-center">
-      <div className="flex space-x-2">
+    <div className="grid min-h-screen grid-rows-6 justify-center">
+      <div className="row-span-2 flex w-96 items-center justify-center space-x-2">
         <span>
-          <PackageOpen size="30" className="h-full" />
+          <PackageOpen size="60" className="" />
         </span>
-        <span className="text-4xl">Hoarder</span>
+        <p className="text-6xl">Hoarder</p>
       </div>
-      <div className="mt-20 flex w-96 flex-col items-center rounded-xl border border-gray-300 p-20">
+      <div className="row-span-4 w-96">
         <SignInForm />
       </div>
     </div>
-- 
cgit v1.3-1-g0d28

