Skip to content

Commit

Permalink
chore: add className in share auth pages
Browse files Browse the repository at this point in the history
  • Loading branch information
joshxfi committed Jan 21, 2025
1 parent 1175a1a commit 161a331
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 27 deletions.
2 changes: 1 addition & 1 deletion apps/partners/src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export const metadata = {
};

export default function Page() {
return <Login redirectPath="/dashboard" />;
return <Login redirectPath="/dashboard" className="mt-36" />;
}
2 changes: 1 addition & 1 deletion apps/social/src/app/(authentication)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export const metadata = {
};

export default function Page() {
return <Login redirectPath="/" />;
return <Login redirectPath="/" className="mt-16" />;
}
2 changes: 1 addition & 1 deletion apps/social/src/app/(authentication)/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export const metadata = {
};

export default function Page() {
return <Register redirectPath="/" />;
return <Register redirectPath="/" className="mt-16" />;
}
2 changes: 1 addition & 1 deletion apps/www/src/app/(authentication)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export const metadata = {
};

export default function Page() {
return <Login redirectPath="/inbox" />;
return <Login redirectPath="/inbox" className="mt-36" />;
}
2 changes: 1 addition & 1 deletion apps/www/src/app/(authentication)/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ export const metadata = {
};

export default function Page() {
return <Register redirectPath="/inbox" />;
return <Register redirectPath="/inbox" className="mt-36" />;
}
2 changes: 1 addition & 1 deletion packages/shared/src/login/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Skeleton } from "@umamin/ui/components/skeleton";

export default function Loading() {
return (
<div className="max-w-lg md:max-w-md container mt-36 [&>div]:gap-3 [&>div]:flex [&>div]:flex-col flex gap-8 flex-col">
<div className="max-w-lg md:max-w-md container mt-16 [&>div]:gap-3 [&>div]:flex [&>div]:flex-col flex gap-8 flex-col">
<div>
<Skeleton className="w-2/5 h-[25px] rounded-md" />
<Skeleton className="w-1/2 h-[10px] rounded-md" />
Expand Down
42 changes: 23 additions & 19 deletions packages/shared/src/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Link from "next/link";
import dynamic from "next/dynamic";
import { redirect } from "next/navigation";
import { LoginForm } from "./components/form";
import { cn } from "@umamin/shared/lib/utils";
import { getSession } from "@umamin/shared/lib/auth";

const BrowserWarning = dynamic(
Expand All @@ -11,8 +12,10 @@ const BrowserWarning = dynamic(

export default async function Login({
redirectPath,
className,
}: {
redirectPath: string;
className?: string;
}) {
const { user } = await getSession();

Expand All @@ -21,27 +24,28 @@ export default async function Login({
}

return (
<>
<section
className={cn("max-w-lg md:max-w-md container min-h-screen", className)}
>
<BrowserWarning />
<section className="max-w-lg md:max-w-md container mt-36 min-h-screen">
<div className="mb-6">
<h2 className="text-2xl tracking-tight font-semibold">
Umamin Account
</h2>
<p className="text-sm text-muted-foreground">
Proceed with your Umamin v2.0 profile
</p>
</div>

<LoginForm />
<div className="mb-6">
<h2 className="text-2xl tracking-tight font-semibold">
Continue with Umamin
</h2>
<p className="text-sm text-muted-foreground">
Proceed with your created Umamin Account
</p>
</div>

<div className="mt-4 text-center text-sm w-full">
Don&apos;t have an account?{" "}
<Link href="/register" className="underline">
Sign up
</Link>
</div>
</section>
</>
<LoginForm />

<div className="mt-4 text-center text-sm w-full">
Don&apos;t have an account?{" "}
<Link href="/register" className="underline">
Sign up
</Link>
</div>
</section>
);
}
2 changes: 1 addition & 1 deletion packages/shared/src/register/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Skeleton } from "@umamin/ui/components/skeleton";

export default function Loading() {
return (
<div className="container max-w-xl lg:mt-36 mt-28 mx-auto ">
<div className="container max-w-xl lg:mt-24 mt-16 mx-auto ">
<div className="flex flex-col gap-4">
<div className="flex gap-3">
<Skeleton className="size-16 md:size-20 rounded-full" />
Expand Down
7 changes: 6 additions & 1 deletion packages/shared/src/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Link from "next/link";
import dynamic from "next/dynamic";
import { redirect } from "next/navigation";
import { cn } from "@umamin/shared/lib/utils";
import { RegisterForm } from "./components/form";
import { getSession } from "@umamin/shared/lib/auth";

Expand All @@ -11,8 +12,10 @@ const BrowserWarning = dynamic(

export default async function Register({
redirectPath,
className,
}: {
redirectPath: string;
className?: string;
}) {
const { user } = await getSession();

Expand All @@ -21,7 +24,9 @@ export default async function Register({
}

return (
<section className="max-w-lg md:max-w-md container mt-36 min-h-screen">
<section
className={cn("max-w-lg md:max-w-md container min-h-screen", className)}
>
<BrowserWarning />

<div className="mb-6">
Expand Down

0 comments on commit 161a331

Please sign in to comment.