Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react';
import './LabPopup.css';
import { ResearchLabItem } from '../types';
import { Link } from 'react-router-dom';
interface LabPopupProps {
lab: ResearchLabItem | null;
onClose: () => void;
}
const LabPopup: React.FC<LabPopupProps> = ({ lab, onClose }) => {
if (!lab) return null;
return (
<div className="popup-overlay">
<div className="popup-content">
<h2>{lab.name}</h2>
<span className="close" onClick={onClose}>×</span>
<div>
<h3>Principal Investigator:</h3>
<p>{lab.principleInvestigator}</p>
</div>
<div>
<h3>College:</h3>
<p>{lab.major.college}</p>
</div>
<div>
<h3>Major:</h3>
<p>{lab.major.name}</p>
</div>
<div>
<h3>Description:</h3>
<p>{lab.description}</p>
</div>
<Link to={`${lab.url}`} target="_blank">
<button className="primary-button">
Go to Website
</button>
</Link>
</div>
</div>
);
};
export default LabPopup;