+ );
+}
\ No newline at end of file
diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx
index 03759ab4..c5c9f80a 100644
--- a/src/pages/Home/Home.tsx
+++ b/src/pages/Home/Home.tsx
@@ -4,11 +4,10 @@ import Features from "../../components/Features";
function Home() {
return (
-
+
-
)
}
diff --git a/src/pages/Login/Login.tsx b/src/pages/Login/Login.tsx
index 858d0f45..6e50088b 100644
--- a/src/pages/Login/Login.tsx
+++ b/src/pages/Login/Login.tsx
@@ -1,11 +1,13 @@
import React, { useState, ChangeEvent, FormEvent, useContext } from "react";
import axios from "axios";
import { useNavigate, Link } from "react-router-dom";
+import { ArrowRight, Lock, Mail, ShieldCheck, Sparkles } from "lucide-react";
+import AuthShell from "../../components/AuthShell";
import { ThemeContext } from "../../context/ThemeContext";
import type { ThemeContextType } from "../../context/ThemeContext";
import { AuthContext } from "../../context/AuthContext";
-const backendUrl = import.meta.env.VITE_BACKEND_URL || ""; // Fallback to an empty string if VITE_BACKEND_URL is undefined to ensure relative routing
+const backendUrl = import.meta.env.VITE_BACKEND_URL || (import.meta.env.DEV ? "http://localhost:5000" : window.location.origin);
interface LoginFormData {
email: string;
@@ -22,6 +24,17 @@ const Login: React.FC = () => {
const authContext = useContext(AuthContext);
const { mode } = themeContext;
+ const highlights = [
+ {
+ title: "Fast access",
+ description: "Jump back into your tracker, dashboards, and community activity in one step.",
+ },
+ {
+ title: "Secure session",
+ description: "Signed-in sessions use the same backend cookie flow your app already relies on.",
+ },
+ ];
+
const handleChange = (e: ChangeEvent) => {
const { name, value } = e.target;
setFormData({ ...formData, [name]: value });
@@ -32,9 +45,7 @@ const Login: React.FC = () => {
setIsLoading(true);
try {
- const response = await axios.post(`${backendUrl}/api/auth/login`, formData, {
- withCredentials: true
- });
+ const response = await axios.post(`${backendUrl}/api/auth/login`, formData, { withCredentials: true });
setMessage(response.data.message);
if (response.data.message === 'Login successful') {
@@ -53,113 +64,98 @@ const Login: React.FC = () => {
};
return (
-
+ Don't have an account?
+
+ Create one now
+
+
+ }
>
- {/* Animated background elements */}
-
-
-
-
-
-
-
-
- {/* Branding */}
-
-
-
+
+
+
+
+ Secure login
+
+
+
+ Welcome back
+
+
+ Enter your credentials to continue to your dashboard.
+