From 6e53164963a3ebadf315822dc9413427a205148c Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Sat, 1 Aug 2026 17:20:28 +0000 Subject: [PATCH] Deploy --- src/app/account/login/page.tsx | 54 ++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/app/account/login/page.tsx diff --git a/src/app/account/login/page.tsx b/src/app/account/login/page.tsx new file mode 100644 index 0000000..1d873b4 --- /dev/null +++ b/src/app/account/login/page.tsx @@ -0,0 +1,54 @@ +'use client' +import { useState } from 'react' +import { useRouter } from 'next/navigation' +import Link from 'next/link' +import { useCustomerAuth } from '@/hooks/useCustomerAuth' + +export default function AccountLoginPage() { + const { login, loading, error } = useCustomerAuth() + const router = useRouter() + const [form, setForm] = useState({ email: '', password: '' }) + + const set = (k: string) => (e: React.ChangeEvent) => + setForm(p => ({ ...p, [k]: e.target.value })) + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault() + try { + await login(form.email, form.password) + router.push('/account/orders') + } catch {} + } + + return ( +
+
+

Sign in

+

Access your orders and account details

+ {error &&
{error}
} +
+
+ + +
+
+ + +
+ +
+

+ Don't have an account?{' '} + Create one +

+
+
+ ) +}