|
| 1 | +import React from "react"; |
| 2 | + |
| 3 | + |
| 4 | +//Created a new interface to make displaying an opportunity easier, contains 9 fields |
| 5 | + |
| 6 | +export interface Opportunity { |
| 7 | + name: string; |
| 8 | + description: string; |
| 9 | + recommended_experience: string; |
| 10 | + pay: number; |
| 11 | + semester: string; |
| 12 | + year: number; |
| 13 | + application_due: Date; |
| 14 | + location: string; |
| 15 | + professor: string |
| 16 | + // Add any other relevant information about an opportunity |
| 17 | +} |
| 18 | + |
| 19 | + |
| 20 | +// List of sample opportunities of type Opportunity |
| 21 | + |
| 22 | +const sampleOpportunities: Opportunity[] = [ |
| 23 | + { |
| 24 | + name: "Research Assistant - Machine Learning Lab", |
| 25 | + description: "Work on cutting-edge ML projects", |
| 26 | + recommended_experience: "Python, Machine Learning basics", |
| 27 | + pay: 15.00, |
| 28 | + semester: "Fall", |
| 29 | + year: 2024, |
| 30 | + application_due: new Date("2024-08-01"), |
| 31 | + location: "DCC", |
| 32 | + professor: "Dr. Emily Chen" |
| 33 | + }, |
| 34 | + { |
| 35 | + name: "Data Visualization Intern - Data Science Center", |
| 36 | + description: "Create compelling visualizations for real-world datasets.", |
| 37 | + recommended_experience: "D3.js, Tableau, or Matplotlib", |
| 38 | + pay: 12.50, |
| 39 | + semester: "Spring", |
| 40 | + year: 2025, |
| 41 | + application_due: new Date("2025-01-15"), |
| 42 | + location: "EMPAC", |
| 43 | + professor: "Dr. Alan Green" |
| 44 | + }, |
| 45 | + { |
| 46 | + name: "Undergraduate Researcher - Renewable Energy Lab", |
| 47 | + description: "Analyze energy efficiency of solar panel setups.", |
| 48 | + recommended_experience: "R, Excel, or energy systems knowledge", |
| 49 | + pay: 14.00, |
| 50 | + semester: "Summer", |
| 51 | + year: 2025, |
| 52 | + application_due: new Date("2025-04-30"), |
| 53 | + location: "Jonsson Engineering Center", |
| 54 | + professor: "Dr. Maria Santos" |
| 55 | + }, |
| 56 | + { |
| 57 | + name: "AI in Healthcare Research Assistant", |
| 58 | + description: "Develop and test AI models for diagnostic tools.", |
| 59 | + recommended_experience: "Python, TensorFlow, basic healthcare knowledge", |
| 60 | + pay: 16.00, |
| 61 | + semester: "Fall", |
| 62 | + year: 2024, |
| 63 | + application_due: new Date("2024-07-20"), |
| 64 | + location: "Biotech Center", |
| 65 | + professor: "Dr. Raj Patel" |
| 66 | + }, |
| 67 | + { |
| 68 | + name: "Human-Computer Interaction (HCI) Researcher", |
| 69 | + description: "Study user interfaces to improve accessibility.", |
| 70 | + recommended_experience: "HTML, CSS, JavaScript, Usability Testing", |
| 71 | + pay: 13.00, |
| 72 | + semester: "Spring", |
| 73 | + year: 2025, |
| 74 | + application_due: new Date("2025-01-10"), |
| 75 | + location: "Carnegie Building", |
| 76 | + professor: "Dr. Susan Miller" |
| 77 | + }, |
| 78 | + { |
| 79 | + name: "Climate Modeling Research Intern", |
| 80 | + description: "Simulate climate patterns using advanced modeling techniques.", |
| 81 | + recommended_experience: "Python, MATLAB, or climate science coursework", |
| 82 | + pay: 14.50, |
| 83 | + semester: "Summer", |
| 84 | + year: 2025, |
| 85 | + application_due: new Date("2025-03-15"), |
| 86 | + location: "Troy Building", |
| 87 | + professor: "Dr. John Reynolds" |
| 88 | + } |
| 89 | +]; |
| 90 | + |
| 91 | + |
| 92 | +// This component returns a 'list' of all the opportunities |
| 93 | + |
| 94 | +const OpportunitiesList = () => { |
| 95 | + return ( |
| 96 | + <div className="p-4"> |
| 97 | + <div className="overflow-x-auto"> |
| 98 | + <table className="w-full border-collapse"> |
| 99 | + <thead> |
| 100 | + {/* Column Headers */} |
| 101 | + <tr className="bg-gray-100"> |
| 102 | + <th className="p-3 text-left border">Position</th> |
| 103 | + <th className="p-3 text-left border">Description</th> |
| 104 | + <th className="p-3 text-left border">Location</th> |
| 105 | + <th className="p-3 text-left border">Pay</th> |
| 106 | + <th className="p-3 text-left border">Professor</th> |
| 107 | + <th className="p-3 text-left border">Term</th> |
| 108 | + <th className="p-3 text-left border">Action</th> |
| 109 | + </tr> |
| 110 | + </thead> |
| 111 | + <tbody> |
| 112 | + {/* Info about the opportunities */} |
| 113 | + {sampleOpportunities.map((opportunity, index) => ( |
| 114 | + <tr key={index} className="hover:bg-gray-50"> |
| 115 | + <td className="p-3 border font-medium">{opportunity.name}</td> |
| 116 | + <td className="p-3 border">{opportunity.description}</td> |
| 117 | + <td className="p-3 border">{opportunity.location}</td> |
| 118 | + <td className="p-3 border">${opportunity.pay}/hr</td> |
| 119 | + <td className="p-3 border">{opportunity.professor}</td> |
| 120 | + <td className="p-3 border"> |
| 121 | + {opportunity.semester} {opportunity.year} |
| 122 | + </td> |
| 123 | + <td className="p-3 border"> |
| 124 | + <button className="bg-blue-500 text-white px-4 py-1 rounded hover:bg-blue-600"> |
| 125 | + Apply |
| 126 | + </button> |
| 127 | + </td> |
| 128 | + </tr> |
| 129 | + ))} |
| 130 | + </tbody> |
| 131 | + </table> |
| 132 | + </div> |
| 133 | + </div> |
| 134 | + ); |
| 135 | +}; |
| 136 | + |
| 137 | +export default OpportunitiesList; |
0 commit comments