From 5075fa3f040dd82989e5830981d86f1c59f117f9 Mon Sep 17 00:00:00 2001 From: saridsa2 Date: Mon, 16 Mar 2026 14:45:56 +0530 Subject: [PATCH] feat: add split-screen login page with role selector and mock auth Co-Authored-By: Claude Sonnet 4.6 --- src/pages/login.tsx | 212 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 211 insertions(+), 1 deletion(-) diff --git a/src/pages/login.tsx b/src/pages/login.tsx index 1222273..a95ba0b 100644 --- a/src/pages/login.tsx +++ b/src/pages/login.tsx @@ -1,3 +1,213 @@ +import { useState } from 'react'; +import { useNavigate } from 'react-router'; +import { useAuth } from '@/providers/auth-provider'; +import { Button } from '@/components/base/buttons/button'; +import { SocialButton } from '@/components/base/buttons/social-button'; +import { Input } from '@/components/base/input/input'; + +const features = [ + { + title: 'Unified Lead Inbox', + description: 'All channels in one workspace', + }, + { + title: 'Campaign Intelligence', + description: 'Real-time performance tracking', + }, + { + title: 'Speed to Contact', + description: 'Automated assignment and outreach', + }, +]; + +type RoleTab = 'executive' | 'admin'; + export const LoginPage = () => { - return
Login placeholder
; + const { login, setRole } = useAuth(); + const navigate = useNavigate(); + + const [activeTab, setActiveTab] = useState('executive'); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + + const handleTabChange = (tab: RoleTab) => { + setActiveTab(tab); + setRole(tab); + }; + + const handleSubmit = (event: React.FormEvent) => { + event.preventDefault(); + login(); + navigate('/'); + }; + + const handleGoogleSignIn = () => { + login(); + navigate('/'); + }; + + return ( +
+ {/* Left panel — 60% — hidden on mobile */} +
+ {/* Abstract corner gradients */} +