Skip to content

Commit

Permalink
fix: file structre for prod build
Browse files Browse the repository at this point in the history
- Separated Login & Registed into two separate files
- Initail Vercel Deployment starts from here
  • Loading branch information
gupta-soham committed Sep 12, 2024
1 parent cecb002 commit 1fc0295
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 55 deletions.
28 changes: 1 addition & 27 deletions app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Icons } from "@/components/Icons";
import SignIn from "@/components/pages/SignIn";
import { buttonVariants } from "@/components/ui/button";
import UserAuthentication from "@/components/UserAuthentication";
import { cn } from "@/lib/utils";
import { ChevronLeft } from "lucide-react";
import Link from "next/link";
Expand All @@ -25,28 +24,3 @@ export default function Login() {
</div>
);
}

export const SignIn = () => {
return (
<div className="container mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[400px]">
<div className="flex flex-col space-y-2 text-center">
<Icons.logo className="mx-auto h-24 w-24" />
<h1 className="text-2xl font-semibold tracking-tight">Welcome back</h1>
<p className="text-sm max-w-xs mx-auto">
By continuing, you are setting up a Crypt anonyumous account and agree
to our User Agreement and Privacy Policy.
</p>
</div>
<UserAuthentication />
<p className="px-8 text-center text-sm text-muted-foreground">
New to Crypt?{" "}
<Link
href="/register"
className="hover:text-brand text-sm underline underline-offset-4"
>
Sign Up
</Link>
</p>
</div>
);
};
27 changes: 1 addition & 26 deletions app/(auth)/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Icons } from "@/components/Icons";
import SignUp from "@/components/pages/SignUp";
import { buttonVariants } from "@/components/ui/button";
import UserAuthentication from "@/components/UserAuthentication";
import { cn } from "@/lib/utils";
import { ChevronLeft } from "lucide-react";
import Link from "next/link";
Expand All @@ -25,27 +24,3 @@ export default function Register() {
</div>
);
}
export const SignUp = () => {
return (
<div className="container mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[400px]">
<div className="flex flex-col space-y-2 text-center">
<Icons.logo className="mx-auto h-24 w-24" />
<h1 className="text-2xl font-semibold tracking-tight">Create your Account</h1>
<p className="text-sm max-w-xs mx-auto">
By continuing, you are setting up a Crypt anonymous account and agree to our
User Agreement and Privacy Policy.
</p>
</div>
<UserAuthentication />
<p className="px-8 text-center text-sm text-muted-foreground">
Already a Crypt User?{" "}
<Link
href="/login"
className="hover:text-brand text-sm underline underline-offset-4"
>
Login
</Link>
</p>
</div>
);
};
2 changes: 1 addition & 1 deletion app/@authModal/(.)login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { SignIn } from "@/app/(auth)/login/page";
import CloseModal from "@/components/CloseModal";
import SignIn from "@/components/pages/SignIn";
import { useRouter } from "next/navigation";
import { useCallback, useEffect } from "react";

Expand Down
2 changes: 1 addition & 1 deletion app/@authModal/(.)register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { SignUp } from "@/app/(auth)/register/page";
import CloseModal from "@/components/CloseModal";
import SignUp from "@/components/pages/SignUp";
import { useRouter } from "next/navigation";
import { useCallback, useEffect } from "react";

Expand Down
28 changes: 28 additions & 0 deletions components/pages/SignIn.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Link from "next/link";
import { Icons } from "../Icons";
import UserAuthentication from "../UserAuthentication";

export default function SignIn() {
return (
<div className="container mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[400px]">
<div className="flex flex-col space-y-2 text-center">
<Icons.logo className="mx-auto h-24 w-24" />
<h1 className="text-2xl font-semibold tracking-tight">Welcome back</h1>
<p className="text-sm max-w-xs mx-auto">
By continuing, you are setting up a Crypt anonyumous account and agree
to our User Agreement and Privacy Policy.
</p>
</div>
<UserAuthentication />
<p className="px-8 text-center text-sm text-muted-foreground">
New to Crypt?{" "}
<Link
href="/register"
className="hover:text-brand text-sm underline underline-offset-4"
>
Sign Up
</Link>
</p>
</div>
);
}
30 changes: 30 additions & 0 deletions components/pages/SignUp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import Link from "next/link";
import { Icons } from "../Icons";
import UserAuthentication from "../UserAuthentication";

export default function SignUp() {
return (
<div className="container mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[400px]">
<div className="flex flex-col space-y-2 text-center">
<Icons.logo className="mx-auto h-24 w-24" />
<h1 className="text-2xl font-semibold tracking-tight">
Create your Account
</h1>
<p className="text-sm max-w-xs mx-auto">
By continuing, you are setting up a Crypt anonymous account and agree
to our User Agreement and Privacy Policy.
</p>
</div>
<UserAuthentication />
<p className="px-8 text-center text-sm text-muted-foreground">
Already a Crypt User?{" "}
<Link
href="/login"
className="hover:text-brand text-sm underline underline-offset-4"
>
Login
</Link>
</p>
</div>
);
}

0 comments on commit 1fc0295

Please sign in to comment.