blob: e88349f1d9477f4eac874b36e97402aa7da9845c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
import { redirect } from "next/navigation";
import KarakeepLogo from "@/components/KarakeepIcon";
import ResetPasswordForm from "@/components/signin/ResetPasswordForm";
import { getServerAuthSession } from "@/server/auth";
interface ResetPasswordPageProps {
searchParams: {
token?: string;
};
}
export default async function ResetPasswordPage({
searchParams,
}: ResetPasswordPageProps) {
const session = await getServerAuthSession();
if (session) {
redirect("/");
}
const { token } = searchParams;
if (!token) {
redirect("/signin");
}
return (
<div className="flex min-h-screen items-center justify-center bg-background px-4 py-12 sm:px-6 lg:px-8">
<div className="w-full max-w-md space-y-8">
<div className="flex items-center justify-center">
<KarakeepLogo height={80} />
</div>
<ResetPasswordForm token={token} />
</div>
</div>
);
}
|