kreativortex/app/auth/signin/page.tsx
Jessica Rekcah 0d339a35e2 init
2025-11-29 10:25:34 +07:00

116 lines
4.1 KiB
TypeScript

/**
* File: page.tsx
* Created by: AI Assistant
* Date: 2025-11-29
* Purpose: Sign in page for kreatiVortex platform
* Part of: kreatiVortex - Platform Pembelajaran Tari Online
*/
'use client';
import { useState } from 'react';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
export default function SignIn() {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [isLoading, setIsLoading] = useState(false);
const router = useRouter();
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setIsLoading(true);
// TODO: Implement actual sign in logic
setTimeout(() => {
setIsLoading(false);
router.push('/dashboard');
}, 1000);
};
return (
<div className="min-h-screen bg-gradient-to-br from-navy-900 via-navy-800 to-gray-900 flex items-center justify-center px-4">
<div className="absolute inset-0 bg-black/20"></div>
<div className="relative z-10 w-full max-w-md">
<div className="bg-white/10 backdrop-blur-lg rounded-2xl p-8 border border-white/20">
{/* Logo */}
<div className="text-center mb-8">
<h1 className="text-3xl font-bold text-white mb-2">
kreati<span className="text-gold-400">Vortex</span>
</h1>
<p className="text-gray-300">Masuk ke akun Anda</p>
</div>
{/* Form */}
<form onSubmit={handleSubmit} className="space-y-6">
<div>
<label htmlFor="email" className="block text-sm font-medium text-gray-300 mb-2">
Email
</label>
<input
id="email"
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-gold-400 focus:border-transparent"
placeholder="nama@email.com"
required
/>
</div>
<div>
<label htmlFor="password" className="block text-sm font-medium text-gray-300 mb-2">
Password
</label>
<input
id="password"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
className="w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-gold-400 focus:border-transparent"
placeholder="••••••••"
required
/>
</div>
<div className="flex items-center justify-between">
<div className="flex items-center">
<input
id="remember"
type="checkbox"
className="h-4 w-4 bg-white/10 border-white/20 rounded focus:ring-gold-400"
/>
<label htmlFor="remember" className="ml-2 block text-sm text-gray-300">
Ingat saya
</label>
</div>
<Link href="/auth/forgot-password" className="text-sm text-gold-400 hover:text-gold-300">
Lupa password?
</Link>
</div>
<button
type="submit"
disabled={isLoading}
className="w-full py-3 px-4 bg-gold-500 hover:bg-gold-400 text-navy-900 font-semibold rounded-lg transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed"
>
{isLoading ? 'Memproses...' : 'Masuk'}
</button>
</form>
{/* Sign up link */}
<div className="mt-8 text-center">
<p className="text-gray-300">
Belum punya akun?{' '}
<Link href="/auth/signup" className="text-gold-400 hover:text-gold-300 font-medium">
Daftar sekarang
</Link>
</p>
</div>
</div>
</div>
</div>
);
}