diff --git a/frontend/src/pages/HomePage.jsx b/frontend/src/pages/HomePage.jsx index 0294610..c85128c 100644 --- a/frontend/src/pages/HomePage.jsx +++ b/frontend/src/pages/HomePage.jsx @@ -1,7 +1,16 @@ -import { Link } from 'react-router-dom'; -import { Video, Users, Zap, Shield, Camera, MessageCircle, Star } from 'lucide-react'; +import { Link, useNavigate } from 'react-router-dom'; +import { Video, Users, Zap, Shield, Camera, MessageCircle, Star, LogOut, LayoutDashboard } from 'lucide-react'; +import { useAuth } from '../contexts/AuthContext'; const HomePage = () => { + const { user, logout } = useAuth(); + const navigate = useNavigate(); + + const handleLogout = () => { + logout(); + navigate('/login'); + }; + return (
{/* Hero Section */} @@ -13,18 +22,39 @@ const HomePage = () => { spotlight.cam
- - Sign in - - - Get Started - + {user ? ( + <> + + + Dashboard + + + + ) : ( + <> + + Sign in + + + Get Started + + + )}
@@ -36,18 +66,12 @@ const HomePage = () => {

Connect with competitors, record each other's rounds, and swap videos in seconds.

-
+
- Start Collaborating - - - Explore Events + {user ? "Go to Dashboard" : "Start Collaborating"}
@@ -203,22 +227,24 @@ const HomePage = () => { {/* CTA Section */} -
-
-

- Ready to elevate your competition experience? -

-

- Join dancers from around the world who are already collaborating on spotlight.cam -

- - Create Your Free Account - -
-
+ {!user && ( +
+
+

+ Ready to elevate your competition experience? +

+

+ Join dancers from around the world who are already collaborating on spotlight.cam +

+ + Create Your Free Account + +
+
+ )} {/* Footer */}