Skip to content

Commit 1ac7e07

Browse files
authored
Merge pull request #61 from brainhack-vandy/speakers-tab
Speakers tab
2 parents 0589b77 + 62ca1d0 commit 1ac7e07

File tree

13 files changed

+320
-7
lines changed

13 files changed

+320
-7
lines changed
1.13 MB
Loading
78.1 KB
Loading
170 KB
Loading
41.7 KB
Loading
26.8 KB
Loading
29.4 KB
Loading
254 KB
Loading

src/App.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,30 @@ import Navbar from "./components/Navbar";
44
import Home from "./components/Home/Home";
55
import Projects from "./components/Projects/Projects";
66
import FAQ from "./components/Faq";
7+
import Speakers from "./components/Speakers/Speakers";
78
import Footer from "./components/Footer";
89
import Teams from './components/Team/Team';
910
import Schedule from "./components/Schedule/Schedule";
1011
import {
1112
HashRouter as Router,
1213
Route,
1314
Routes,
14-
Navigate
15+
Navigate,
16+
useLocation
1517
} from "react-router-dom";
1618
import "./App.css";
1719
import "bootstrap/dist/css/bootstrap.min.css";
1820

21+
function ScrollToTop() {
22+
const { pathname } = useLocation();
23+
24+
useEffect(() => {
25+
window.scrollTo(0, 0);
26+
}, [pathname]);
27+
28+
return null;
29+
}
30+
1931
function App() {
2032
const [load, upadateLoad] = useState(true);
2133

@@ -29,6 +41,7 @@ function App() {
2941

3042
return (
3143
<Router>
44+
<ScrollToTop />
3245
<LoadingAnimation load={load} />
3346
<div className="App" id={load ? "no-scroll" : "scroll"}>
3447
<Navbar />
@@ -38,6 +51,7 @@ function App() {
3851
<Route path="/projects" element={<Projects />} />
3952
<Route path="/team" element={<Teams />} />
4053
<Route path="/faq" element={<FAQ />} />
54+
<Route path="/speakers" element={<Speakers />} />
4155
<Route path="*" element={<Navigate to="/" />} />
4256
</Routes>
4357
<Footer />

src/components/Navbar.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
} from "react-icons/ai";
1414
import Button from "react-bootstrap/Button";
1515
import { CgGitFork } from "react-icons/cg";
16+
import { RiSpeakLine } from "react-icons/ri";
17+
1618

1719
function NavBar() {
1820
const [expand, updateExpanded] = useState(false);
@@ -75,6 +77,12 @@ function NavBar() {
7577
</Nav.Link>
7678
</Nav.Item>
7779

80+
<Nav.Item>
81+
<Nav.Link as={Link} to="/speakers" onClick={() => updateExpanded(false)}>
82+
<RiSpeakLine className="nav-icon" /> Speakers
83+
</Nav.Link>
84+
</Nav.Item>
85+
7886
<Nav.Item>
7987
<Nav.Link as={Link} to="/team" onClick={() => updateExpanded(false)}>
8088
<AiOutlineTeam className="nav-icon" /> Team

src/components/Schedule/Schedule.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const ScheduleCalendar = () => {
5353
case 'hacking':
5454
return ['event-color-3'];
5555
case 'keynote':
56-
return ['event-color-4'];
56+
return ['event-color-4', 'clickable-event'];
5757
case 'unconference':
5858
return ['event-color-5'];
5959
default:
@@ -62,14 +62,12 @@ const ScheduleCalendar = () => {
6262
};
6363

6464
const renderEventContent = (eventInfo) => {
65-
const isClickable = ['workshop', 'keynote'].includes(eventInfo.event.extendedProps.type);
65+
const isKeynote = eventInfo.event.extendedProps.type === 'keynote'
6666

67-
if (isClickable) {
67+
if (isKeynote) {
6868
return (
6969
<a
70-
href="https://brainhack-vandy.github.io/"
71-
target="_blank"
72-
rel="noopener noreferrer"
70+
href={`#/speakers`}
7371
className="custom-event-content clickable"
7472
onClick={(e) => e.stopPropagation()}
7573
>
@@ -78,6 +76,22 @@ const ScheduleCalendar = () => {
7876
);
7977
}
8078

79+
// const isWorkshop = eventInfo.event.extendedProps.type === 'workshop';
80+
81+
// if (isWorkshop) {
82+
// return (
83+
// <a
84+
// href="https://brainhack-vandy.github.io/"
85+
// target="_blank"
86+
// rel="noopener noreferrer"
87+
// className="custom-event-content clickable"
88+
// onClick={(e) => e.stopPropagation()}
89+
// >
90+
// <div className="event-title">{eventInfo.event.title}</div>
91+
// </a>
92+
// );
93+
// }
94+
8195
return (
8296
<div className="custom-event-content">
8397
<div className="event-title">{eventInfo.event.title}</div>

0 commit comments

Comments
 (0)