/** * 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, useRouter } from '@/i18n/routing'; import { authClient } from '@/lib/auth-client'; import { useTranslations } from 'next-intl'; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; export default function SignIn() { const t = useTranslations('Auth'); 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); await authClient.signIn.email({ email, password, }, { onSuccess: () => { router.push('/dashboard'); }, onError: (ctx) => { alert(ctx.error.message); setIsLoading(false); } }); }; return (
{/* Logo */}

kreatiVortex

{t('signInTitle')}

{/* Form */}
setEmail(e.target.value)} className="bg-white/10 border-white/20 text-white placeholder:text-gray-400 focus-visible:ring-gold-400" placeholder="nama@email.com" required />
setPassword(e.target.value)} className="bg-white/10 border-white/20 text-white placeholder:text-gray-400 focus-visible:ring-gold-400" placeholder="••••••••" required />
{t('forgotPassword')}
{/* Sign up link */}

{t('noAccount')}{' '} {t('registerNow')}

); }