feat : update

This commit is contained in:
2026-10-03 14:51:40 +07:00 Unverified
parent 6ceff15e20
commit f5cfe0a22e
36 changed files with 47 additions and 70 deletions
+15
View File
@@ -0,0 +1,15 @@
import { connection } from "next/server";
import { SiteHeader } from "@/components/public/site-header";
import { RegistrationOtpForm } from "@/components/auth/registration-otp-form";
import { safeAuthReturnPath } from "@/lib/auth/return-path";
export const instant = false;
export default async function CheckEmailPage({ searchParams }: PageProps<"/auth/check-email">) {
await connection();
const { email, next, setup } = await searchParams;
return <div className="min-h-svh"><SiteHeader /><main className="grid min-h-[calc(100svh-4rem)] place-items-center p-4">
<RegistrationOtpForm email={typeof email === "string" ? email : ""}
nextPath={safeAuthReturnPath(next)} setup={setup === "1"} />
</main></div>;
}
+8
View File
@@ -0,0 +1,8 @@
import { SiteHeader } from "@/components/public/site-header";
import { EmailActionForm } from "@/components/auth/email-action-form";
export default function ForgotPasswordPage() {
return <div className="min-h-svh"><SiteHeader /><main className="grid min-h-[calc(100svh-4rem)] place-items-center p-4">
<EmailActionForm mode="forgot" />
</main></div>;
}
+11
View File
@@ -0,0 +1,11 @@
import { connection } from "next/server";
import { AccountPage } from "@/components/auth/account-page";
export const instant = false;
export default async function LoginPage({ searchParams }: PageProps<"/auth/login">) {
await connection();
const { next, verified, error } = await searchParams;
return <AccountPage mode="login" next={next} verified={verified === "1" && !error}
verificationError={typeof error === "string"} />;
}
+13
View File
@@ -0,0 +1,13 @@
import { connection } from "next/server";
import { SiteHeader } from "@/components/public/site-header";
import { EmailActionForm } from "@/components/auth/email-action-form";
export const instant = false;
export default async function ResetPasswordPage({ searchParams }: PageProps<"/auth/password-reset">) {
await connection();
const { token, error } = await searchParams;
return <div className="min-h-svh"><SiteHeader /><main className="grid min-h-[calc(100svh-4rem)] place-items-center p-4">
<EmailActionForm mode="reset" token={typeof token === "string" ? token : ""} invalidToken={typeof error === "string"} />
</main></div>;
}
+10
View File
@@ -0,0 +1,10 @@
import { connection } from "next/server";
import { AccountPage } from "@/components/auth/account-page";
export const instant = false;
export default async function RegisterPage({ searchParams }: PageProps<"/auth/register">) {
await connection();
const { next } = await searchParams;
return <AccountPage mode="register" next={next} />;
}