diff --git a/.env b/.env index 86dd9a4..ff1a1d8 100644 --- a/.env +++ b/.env @@ -1,3 +1,2 @@ VITE_API_BASE_URL=http://localhost:8080/api/v1 VITE_GOOGLE_CLIENT_ID=google_client_id -VERSION=1.0.0 diff --git a/src/pages/auth/LoginPage.tsx b/src/pages/auth/LoginPage.tsx index 3b1d522..722e93f 100644 --- a/src/pages/auth/LoginPage.tsx +++ b/src/pages/auth/LoginPage.tsx @@ -1,5 +1,5 @@ import { useState, useEffect, useRef, useCallback } from "react"; -import { Link, useNavigate } from "react-router-dom"; +import { Link, Navigate, useNavigate } from "react-router-dom"; import { Eye, EyeOff } from "lucide-react"; import { BrandLogo } from "../../components/brand/BrandLogo"; @@ -64,6 +64,11 @@ function GoogleIcon({ className }: { className?: string }) { export function LoginPage() { const navigate = useNavigate(); + const token = localStorage.getItem("access_token"); + if (token) { + return ; + } + const [showPassword, setShowPassword] = useState(false); const [email, setEmail] = useState(""); const [password, setPassword] = useState("");