+
+ {user.role === 'entrepreneur' ? 'Entrepreneur Panel' : 'Investor Panel'}
+
+
{sidebarItems.map((item, index) => (
-
+
))}
-
+
- Settings
+ System
{commonItems.map((item, index) => (
-
+
))}
-
+
);
-};
\ No newline at end of file
+};
diff --git a/src/components/video/VideoCallMock.jsx b/src/components/video/VideoCallMock.jsx
new file mode 100644
index 000000000..097878847
--- /dev/null
+++ b/src/components/video/VideoCallMock.jsx
@@ -0,0 +1,31 @@
+import { Mic, MicOff, Video, VideoOff, PhoneOff } from 'lucide-react';
+import { useState } from 'react';
+
+const VideoCallMock = () => {
+ const [micOn, setMicOn] = useState(true);
+ const [videoOn, setVideoOn] = useState(true);
+
+ return (
+
+
+ Video Stream (Mock)
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default VideoCallMock;
diff --git a/src/main.tsx b/src/main.tsx
index ea9e3630a..94fdbd5c9 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -3,6 +3,9 @@ import { createRoot } from 'react-dom/client';
import App from './App.tsx';
import './index.css';
+
+
+
createRoot(document.getElementById('root')!).render(
diff --git a/src/pages/auth/LoginPage.tsx b/src/pages/auth/LoginPage.tsx
index bbd5b08a0..de134ac96 100644
--- a/src/pages/auth/LoginPage.tsx
+++ b/src/pages/auth/LoginPage.tsx
@@ -1,6 +1,13 @@
import React, { useState } from 'react';
import { Link, useNavigate } from 'react-router-dom';
-import { User, CircleDollarSign, Building2, LogIn, AlertCircle } from 'lucide-react';
+import {
+ User,
+ CircleDollarSign,
+ Building2,
+ LogIn,
+ AlertCircle,
+ ShieldCheck,
+} from 'lucide-react';
import { useAuth } from '../../context/AuthContext';
import { Button } from '../../components/ui/Button';
import { Input } from '../../components/ui/Input';
@@ -12,26 +19,47 @@ export const LoginPage: React.FC = () => {
const [role, setRole] = useState('entrepreneur');
const [error, setError] = useState(null);
const [isLoading, setIsLoading] = useState(false);
-
+
+ // 2FA state
+ const [showOTP, setShowOTP] = useState(false);
+ const [otp, setOtp] = useState('');
+
const { login } = useAuth();
const navigate = useNavigate();
-
+
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setError(null);
setIsLoading(true);
-
+
try {
- await login(email, password, role);
- // Redirect based on user role
- navigate(role === 'entrepreneur' ? '/dashboard/entrepreneur' : '/dashboard/investor');
+ // Step 1 → credentials correct → show OTP UI
+ if (!showOTP) {
+ await login(email, password, role);
+ setShowOTP(true);
+ setIsLoading(false);
+ return;
+ }
+
+ // Step 2 → OTP mock check
+ if (otp.length !== 6) {
+ setError('Invalid OTP code');
+ setIsLoading(false);
+ return;
+ }
+
+ navigate(
+ role === 'entrepreneur'
+ ? '/dashboard/entrepreneur'
+ : '/dashboard/investor'
+ );
} catch (err) {
setError((err as Error).message);
setIsLoading(false);
}
};
-
- // For demo purposes, pre-filled credentials
+
+ // Demo credentials
const fillDemoCredentials = (userRole: UserRole) => {
if (userRole === 'entrepreneur') {
setEmail('sarah@techwave.io');
@@ -42,23 +70,21 @@ export const LoginPage: React.FC = () => {
}
setRole(userRole);
};
-
+
return (
+
Sign in to Business Nexus
- Connect with investors and entrepreneurs
+ Secure access with role-based login
@@ -70,140 +96,117 @@ export const LoginPage: React.FC = () => {
{error}
)}
-
+
);
-};
\ No newline at end of file
+};
diff --git a/src/pages/auth/RegisterPage.tsx b/src/pages/auth/RegisterPage.tsx
index e6ff2ab89..d2836d9d5 100644
--- a/src/pages/auth/RegisterPage.tsx
+++ b/src/pages/auth/RegisterPage.tsx
@@ -1,6 +1,13 @@
import React, { useState } from 'react';
import { Link, useNavigate } from 'react-router-dom';
-import { User, Mail, Lock, CircleDollarSign, Building2, AlertCircle } from 'lucide-react';
+import {
+ User,
+ Mail,
+ Lock,
+ CircleDollarSign,
+ Building2,
+ AlertCircle,
+} from 'lucide-react';
import { useAuth } from '../../context/AuthContext';
import { Button } from '../../components/ui/Button';
import { Input } from '../../components/ui/Input';
@@ -14,43 +21,70 @@ export const RegisterPage: React.FC = () => {
const [role, setRole] = useState
('entrepreneur');
const [error, setError] = useState(null);
const [isLoading, setIsLoading] = useState(false);
-
+
+ // Password strength logic (UI only)
+ const getPasswordStrength = () => {
+ if (password.length === 0) return '';
+ if (password.length < 6) return 'Weak';
+ if (password.length < 10) return 'Medium';
+ return 'Strong';
+ };
+
+ const strength = getPasswordStrength();
+
const { register } = useAuth();
const navigate = useNavigate();
-
+
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setError(null);
-
- // Validate passwords match
+
if (password !== confirmPassword) {
setError('Passwords do not match');
return;
}
-
+
setIsLoading(true);
-
+
try {
await register(name, email, password, role);
- // Redirect based on user role
- navigate(role === 'entrepreneur' ? '/dashboard/entrepreneur' : '/dashboard/investor');
+ navigate(
+ role === 'entrepreneur'
+ ? '/dashboard/entrepreneur'
+ : '/dashboard/investor'
+ );
} catch (err) {
setError((err as Error).message);
setIsLoading(false);
}
};
-
+
return (
+
Create your account
@@ -67,8 +101,9 @@ export const RegisterPage: React.FC = () => {
{error}
)}
-
+
-
+
{
fullWidth
startAdornment={}
/>
-
+
{
fullWidth
startAdornment={}
/>
-
+
{
fullWidth
startAdornment={}
/>
-
+
+ {/* Password strength meter */}
+ {strength && (
+
+
+
+ Password strength:{' '}
+ {strength}
+
+
+ )}
+
{
fullWidth
startAdornment={}
/>
-
+
-
-