import type { Metadata } from "next"; import Link from "next/link"; import { redirect } from "next/navigation"; import { getServerAuthSession } from "~/server/auth"; import { Card, CardContent, CardDescription, CardTitle, } from "~/components/ui/card"; import { LoginForm } from "./login-form"; import { Logo } from "~/components/logo"; export const metadata: Metadata = { title: "Login | HRIStudio", description: "Login to your account", }; export default async function LoginPage({ searchParams, }: { searchParams: Promise> }) { const session = await getServerAuthSession(); if (session) { redirect("/dashboard"); } const params = await searchParams; const error = params?.error ? String(params.error) : null; const showError = error === "CredentialsSignin"; return (
Welcome back Sign in to your account to continue

By signing in, you agree to our{" "} Terms of Service {" "} and{" "} Privacy Policy .

); }