diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx
index e791fc2..11fabb6 100644
--- a/src/pages/Login.tsx
+++ b/src/pages/Login.tsx
@@ -1 +1,61 @@
-export default function Login() { return
Login
; }
+import { useState } from "react";
+import { useNavigate, Link } from "react-router-dom";
+import { Shield } from "lucide-react";
+import { api } from "../api/client";
+import { useAuthStore } from "../store/auth";
+import { Button } from "../components/ui/Button";
+import { Input } from "../components/ui/Input";
+import { GlassCard } from "../components/ui/GlassCard";
+
+export default function Login() {
+ const [email, setEmail] = useState("");
+ const [password, setPassword] = useState("");
+ const [error, setError] = useState("");
+ const [loading, setLoading] = useState(false);
+ const { setAuth } = useAuthStore();
+ const navigate = useNavigate();
+
+ async function handleLogin(e: React.FormEvent) {
+ e.preventDefault();
+ setError("");
+ setLoading(true);
+ const res = await api.login(email, password);
+ setLoading(false);
+ if (!res.ok) { setError(res.error || "Ошибка входа"); return; }
+ setAuth(res.access_token, res.refresh_token, res.user);
+ navigate("/dashboard");
+ }
+
+ return (
+
+
+
+
+
+
+
+
Войти в Aura Store
+
Доступ к личному кабинету
+
+
+
+
+
+
+
+ Нет аккаунта? Зарегистрироваться
+
+
+
+ );
+}
diff --git a/src/pages/Register.tsx b/src/pages/Register.tsx
index 1c84e19..75df22f 100644
--- a/src/pages/Register.tsx
+++ b/src/pages/Register.tsx
@@ -1 +1,58 @@
-export default function Register() { return Register
; }
+import { useState } from "react";
+import { useNavigate, Link } from "react-router-dom";
+import { Shield } from "lucide-react";
+import { api } from "../api/client";
+import { useAuthStore } from "../store/auth";
+import { Button } from "../components/ui/Button";
+import { Input } from "../components/ui/Input";
+import { GlassCard } from "../components/ui/GlassCard";
+
+export default function Register() {
+ const [name, setName] = useState("");
+ const [email, setEmail] = useState("");
+ const [password, setPassword] = useState("");
+ const [error, setError] = useState("");
+ const [loading, setLoading] = useState(false);
+ const { setAuth } = useAuthStore();
+ const navigate = useNavigate();
+
+ async function handleRegister(e: React.FormEvent) {
+ e.preventDefault();
+ setError("");
+ if (password.length < 6) { setError("Пароль минимум 6 символов"); return; }
+ setLoading(true);
+ const res = await api.register(email, password, name);
+ setLoading(false);
+ if (!res.ok) { setError(res.error || "Ошибка регистрации"); return; }
+ setAuth(res.access_token, res.refresh_token, res.user);
+ navigate("/dashboard");
+ }
+
+ return (
+
+
+
+
+
+
+
+
Создать аккаунт
+
Регистрация в Aura Store
+
+
+
+
+
+ Уже есть аккаунт? Войти
+
+
+
+ );
+}