11import { useState } from 'react' ;
22import { ChevronDown , ChevronUp , Filter , X } from 'lucide-react' ;
3+ import filtersData from '@/data/filters.json' ;
34
45interface FilterOption {
56 title : string ;
@@ -13,96 +14,10 @@ interface FilterSectionProps {
1314
1415export default function FilterSection ( { onFilterSubmit, onClearFilters } : FilterSectionProps ) {
1516 const [ isOpen , setIsOpen ] = useState ( false ) ;
17+ const [ filters ] = useState < FilterOption [ ] > ( filtersData ) ;
1618 const [ selectedOptions , setSelectedOptions ] = useState < Record < string , Set < string > > > ( { } ) ;
1719 const [ openDropdowns , setOpenDropdowns ] = useState < Record < string , boolean > > ( { } ) ;
1820
19- const filters : FilterOption [ ] = [
20- {
21- title : "Project Type" ,
22- options : [ "Final Year Project" , "Mini Project" , "Research Project" , "Personal Project" , "Others" ]
23- } ,
24- {
25- title : "Department" ,
26- options : [ "CSE" , "IT" , "EEE" , "ECE" , "MECH" , "CIVIL" , "Others" ]
27- } ,
28- {
29- title : "Year of Submission" ,
30- options : [ "2025" , "2024" , "2023" , "2022" , "2021" ]
31- } ,
32- {
33- title : "Domain" ,
34- options : [
35- "Other" ,
36- "Web Development" ,
37- "Mobile App Development (Android & iOS)" ,
38- "Artificial Intelligence (AI) & Machine Learning (ML)" ,
39- "Data Science & Big Data Analytics" ,
40- "Cybersecurity & Ethical Hacking" ,
41- "Blockchain & Cryptocurrency" ,
42- "Cloud Computing & DevOps" ,
43- "Game Development & AR/VR" ,
44- "Internet of Things (IoT)" ,
45- "Natural Language Processing (NLP)" ,
46- "Database Management & Data Warehousing" ,
47- "Quantum Computing" ,
48- "Software Testing & Automation" ,
49- "Full Stack Development (MERN, MEAN, etc.)" ,
50- "UI/UX & Human-Computer Interaction" ,
51- "Computer Networks & Network Security" ,
52- "Augmented Reality (AR) & Virtual Reality (VR)" ,
53- "E-commerce & CMS Development" ,
54- "No-Code & Low-Code Development" ,
55- "Cloud Security & Serverless Computing" ,
56- "DevOps & Site Reliability Engineering (SRE)" ,
57- "Edge Computing & Distributed Systems" ,
58- "IT Infrastructure & System Administration" ,
59- "Data Engineering & Business Intelligence" ,
60- "IT Governance & Compliance" ,
61- "Structural Engineering & Earthquake-Resistant Design" ,
62- "Transportation & Highway Engineering" ,
63- "Geotechnical Engineering & Soil Mechanics" ,
64- "Smart Cities & Urban Planning" ,
65- "Sustainable & Green Building Technology" ,
66- "Hydraulics & Water Resource Engineering" ,
67- "Construction Management & Project Planning" ,
68- "Environmental Engineering & Waste Management" ,
69- "Building Information Modeling (BIM)" ,
70- "Disaster Management & Risk Analysis" ,
71- "Bridge & Tunnel Engineering" ,
72- "Surveying & Remote Sensing (GIS & GPS)" ,
73- "VLSI & Chip Design" ,
74- "Embedded Systems & Microcontrollers" ,
75- "Wireless Communication (5G, LTE, Satellite)" ,
76- "Signal & Image Processing" ,
77- "Optical Fiber & Photonics" ,
78- "Digital & Analog Circuit Design" ,
79- "Antenna & RF Engineering" ,
80- "Smart Sensors & Wearable Technology" ,
81- "Audio & Speech Processing" ,
82- "Biomedical Electronics & Bionics" ,
83- "MEMS & Nanoelectronics" ,
84- "Power Systems & Smart Grids" ,
85- "Renewable Energy (Solar, Wind, Hydro)" ,
86- "Control Systems & Automation" ,
87- "Robotics & Mechatronics" ,
88- "Electric Vehicles (EV) & Battery Technologies" ,
89- "High Voltage Engineering" ,
90- "Energy Management & Conservation" ,
91- "Industrial Instrumentation & Process Control" ,
92- "Electrical Machines & Drives" ,
93- "Smart Home & Building Automation" ,
94- "CAD, CAM & 3D Printing" ,
95- "Automotive & Aerospace Engineering" ,
96- "Thermodynamics & Fluid Mechanics" ,
97- "Mechatronics & Smart Manufacturing" ,
98- "HVAC & Refrigeration Systems" ,
99- "Material Science & Composites" ,
100- "Renewable Energy in Mechanical Systems" ,
101- "Computational Fluid Dynamics (CFD)" ,
102- "Finite Element Analysis (FEA)"
103- ]
104- }
105- ] ;
10621
10722 const toggleDropdown = ( filterTitle : string ) => {
10823 setOpenDropdowns ( prev => ( {
0 commit comments