import { useState, useMemo } from 'react'; import { motion } from 'framer-motion'; import { Search, Users, Filter, ArrowUpDown, BookOpen, ChevronRight, AlertTriangle } from 'lucide-react'; import FacultyCard from '@/components/FacultyCard/FacultyCard'; import { StaggerContainer, StaggerItem } from '@/components/AnimatedContainer/AnimatedContainer'; import { FACULTY_DATA, DEPARTMENTS } from '@/constants'; import { Link } from 'react-router-dom'; export default function Faculty() { const [searchFaculty, setSearchFaculty] = useState(''); const [selectedDept, setSelectedDept] = useState('All Departments'); const [sortBy, setSortBy] = useState('Name A-Z'); const filteredAndSortedFaculty = useMemo(() => { const filtered = FACULTY_DATA.filter((f) => { const searchLower = searchFaculty.trim().toLowerCase(); const matchSearch = f.name.toLowerCase().includes(searchLower) || f.department.toLowerCase().includes(searchLower) || f.designation.toLowerCase().includes(searchLower) || (f.specialization && f.specialization.toLowerCase().includes(searchLower)); const matchDept = selectedDept === 'All Departments' || f.department === selectedDept; return matchSearch && matchDept; }); return filtered.sort((a, b) => { if (sortBy === 'Name A-Z') return a.name.localeCompare(b.name); if (sortBy === 'Department') return a.department.localeCompare(b.department); if (sortBy === 'Designation') return a.designation.localeCompare(b.designation); return 0; }); }, [searchFaculty, selectedDept, sortBy]); return (
{/* Background decorations */}
{/* Header */}
Home Faculty Directory

Faculty{' '} Directory

Browse and connect with experienced faculty members across all departments.

{/* Under Development Banner */}
Under Development
Currently displaying sample mock faculty profiles. Official RIT faculty directory integration is in progress.
Mock Data Active
{/* Faculty Hero Section */}

Faculty Directory

Browse and connect with experienced faculty members. Search by name, department, or specialization.

Department Overview

{[ { abrv: 'CSE', full: 'Computer Science & Engineering', color: 'blue' }, { abrv: 'CSBS', full: 'Computer Science & Business Systems', color: 'indigo' }, { abrv: 'AIML', full: 'Artificial Intelligence & Machine Learning', color: 'sky' }, { abrv: 'ECE', full: 'Electronics & Communication Engineering', color: 'purple' }, { abrv: 'MECH', full: 'Mechanical Engineering', color: 'orange' }, { abrv: 'CIVIL', full: 'Civil Engineering', color: 'emerald' }, { abrv: 'AI & DS', full: 'Artificial Intelligence & Data Science', color: 'pink' }, { abrv: 'EEE', full: 'Electrical & Electronics Engineering', color: 'yellow' }, ].map(d => { const count = FACULTY_DATA.filter(f => f.department === d.full).length; return (
{d.abrv}
{count}
); })}
{/* Search Section */}
setSearchFaculty(e.target.value)} className="w-full pl-12 pr-4 py-3.5 rounded-2xl bg-[#F8FAFC] border-none text-sm text-[#1E293B] placeholder-[#94A3B8] focus:ring-2 focus:ring-[#FF7A00]/20 focus:outline-none transition-all" style={{ fontFamily: 'Inter, sans-serif' }} />
{/* Grid */} {filteredAndSortedFaculty.length > 0 ? ( {filteredAndSortedFaculty.map((faculty) => ( ))} ) : (

No faculty found

Try adjusting your search or filters.

)} {/* Bottom Status */}
👥 Showing {filteredAndSortedFaculty.length} Faculty Members
); }