Files
neta/app/login/page.tsx
T
Poyraz Avsever 01692d3958 chore: update dependencies and configuration for Tailwind CSS
- Added "@tailwindcss/postcss" to package.json dependencies.
- Updated "tailwindcss" version to "^4.3.0" in package.json.
- Modified postcss.config.mjs to use "@tailwindcss/postcss" instead of "tailwindcss".
- Changed darkMode configuration in tailwind.config.ts to a string format.
2026-06-02 12:46:18 +03:00

102 lines
3.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { login } from "@/app/login/actions";
import { AuthPageShell } from "@/components/auth/auth-page-shell";
import { ErrorToaster } from "@/components/error-toaster";
import { LockKeyhole, LogIn, Mail, Search } from "lucide-react";
import Link from "next/link";
import { Button, Input, Label } from "poyraz-ui/atoms";
export default async function LoginPage({
searchParams,
}: {
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
}) {
const resolvedParams = await searchParams;
const error = resolvedParams?.error;
const message = resolvedParams?.message;
return (
<>
{error && message && <ErrorToaster message={String(message)} />}
<AuthPageShell
title="Giriş yap"
description="Cognis çalışma alanına erişmek için hesabına giriş yap."
form={
<form className="space-y-6">
<div className="space-y-4">
<div className="space-y-2">
<Label htmlFor="email" className="flex items-center gap-2">
<Mail className="h-4 w-4 text-muted-foreground" />
E-posta
</Label>
<Input
id="email"
name="email"
type="email"
placeholder="ornek@mail.com"
required
className="h-11"
/>
</div>
<div className="space-y-2">
<div className="flex items-center justify-between gap-3">
<Label htmlFor="password" className="flex items-center gap-2">
<LockKeyhole className="h-4 w-4 text-muted-foreground" />
Şifre
</Label>
<Link
href="/forgot-password"
className="text-sm font-medium text-primary transition-colors hover:text-primary-hover"
>
Şifremi unuttum
</Link>
</div>
<Input
id="password"
name="password"
type="password"
required
className="h-11"
/>
</div>
</div>
<Button formAction={login} className="h-11 w-full gap-2">
<LogIn className="h-4 w-4" />
Giriş yap
</Button>
</form>
}
secondaryAction={
<div className="space-y-6">
<div className="relative">
<div className="absolute inset-0 flex items-center">
<span className="w-full border-t border-border" />
</div>
<div className="relative flex justify-center text-xs uppercase">
<span className="bg-background px-2 text-muted-foreground">veya</span>
</div>
</div>
<Button type="button" variant="outline" className="h-11 w-full gap-2">
<Search className="h-4 w-4" />
Google ile devam et
</Button>
</div>
}
footer={
<div className="text-center text-sm">
Hesabın yok mu?{" "}
<Link
href="/register"
className="font-medium text-primary transition-colors hover:text-primary-hover"
>
Kayıt ol
</Link>
</div>
}
/>
</>
);
}