72 lines
2.4 KiB
TypeScript
72 lines
2.4 KiB
TypeScript
import { LearnerLayout } from '../../components/learner/LearnerLayout';
|
|
import { RecentActivity } from './RecentActivity';
|
|
import { WelcomeMessage } from './WelcomeMessage';
|
|
import { CurrentLearningProgress } from './CurrentLearningProgress';
|
|
import { ConnectionStatus } from './ConnectionStatus';
|
|
import { WeeklyProgressTracker } from './WeeklyProgressTracker';
|
|
import { AchievementBadges } from './AchievementBadges';
|
|
import { GlobalLeaderboard } from './GlobalLeaderboard';
|
|
import { ActivityRecommendations } from './ActivityRecommendations';
|
|
import { RecentlyViewed } from './RecentlyViewed';
|
|
import { WhatOthersLearning } from './WhatOthersLearning';
|
|
|
|
|
|
|
|
interface DashboardProps {
|
|
userType?: 'individual' | 'corporate';
|
|
}
|
|
|
|
// Main Dashboard component
|
|
export default function Dashboard({ userType = 'individual' }: DashboardProps) {
|
|
const user = { name: 'Alex', email: 'alex@example.com' };
|
|
|
|
return (
|
|
<LearnerLayout currentPage="/dashboard" userType={userType}>
|
|
<div className="container mx-auto px-4 lg:px-8 py-8 space-y-8">
|
|
<ConnectionStatus />
|
|
|
|
{/* Welcome Section */}
|
|
<div className="mb-8">
|
|
<WelcomeMessage user={user} />
|
|
<p className="text-lg text-gray-600 leading-relaxed">
|
|
Continue your leadership development journey with our personalized recommendations and track your progress
|
|
</p>
|
|
</div>
|
|
|
|
{/* Weekly Progress Tracker */}
|
|
<WeeklyProgressTracker />
|
|
|
|
{/* Current Learning Progress */}
|
|
<CurrentLearningProgress userType={userType} />
|
|
|
|
{/* Achievement Badges */}
|
|
<AchievementBadges />
|
|
|
|
{/* Global Leaderboard (left, prominent) and Recent Activity (right) Grid */}
|
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
|
<div className="lg:col-span-2">
|
|
<GlobalLeaderboard />
|
|
</div>
|
|
<div className="lg:col-span-1">
|
|
<RecentActivity />
|
|
</div>
|
|
</div>
|
|
|
|
{/* Based on your activity recommendations - NO TOP PADDING */}
|
|
<div>
|
|
<ActivityRecommendations userType={userType} />
|
|
</div>
|
|
|
|
{/* Recently Viewed section - NO TOP PADDING */}
|
|
<div>
|
|
<RecentlyViewed userType={userType} />
|
|
</div>
|
|
|
|
{/* What are others learning section - NO TOP PADDING */}
|
|
<div>
|
|
<WhatOthersLearning userType={userType} />
|
|
</div>
|
|
</div>
|
|
</LearnerLayout>
|
|
);
|
|
} |