Skip to content

Commit 072f2a4

Browse files
committed
fix: display 2024 schedule on 2024 route
1 parent 501c5dc commit 072f2a4

File tree

10 files changed

+89
-340
lines changed

10 files changed

+89
-340
lines changed

src/2023/Schedule/Schedule2023.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
StyledLessIcon,
1212
StyledMoreIcon,
1313
StyledScheduleSection,
14-
} from "./Schedule.style";
14+
} from "../../styles/Schedule/Schedule.style";
1515
import * as Sentry from "@sentry/react";
1616

1717
const Schedule2023: FC<React.PropsWithChildren<unknown>> = () => {

src/2023/Schedule/ScheduleData.ts

Lines changed: 0 additions & 100 deletions
This file was deleted.

src/2023/Schedule/components/AvatarCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
StyledWelcomerText,
77
StyledWelcomerTextContainer,
88
StyledWelcomerTextLink
9-
} from "../Schedule.style";
9+
} from "../../../styles/Schedule/Schedule.style";
1010

1111
type AvatarCardProps = {
1212
meet: {

src/2024/Schedule/Schedule2024.tsx

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import { MOBILE_BREAKPOINT } from "../../constants/BreakPoints";
2+
import { Color } from "../../styles/colors";
3+
import React, { FC } from "react";
4+
import LessThanBlueWhiteIcon from "../../assets/images/MoreThanBlueWhiteIcon.svg";
5+
import MoreThanBlueWhiteIcon from "../../assets/images/LessThanBlueWhiteIcon.svg";
6+
import SectionWrapper from "../../components/SectionWrapper/SectionWrapper";
7+
import TitleSection from "../../components/SectionTitle/TitleSection";
8+
import { useWindowSize } from "react-use";
9+
import data from "../../data/2024.json";
10+
11+
import * as Sentry from "@sentry/react";
12+
import { Link } from "react-router";
13+
import {
14+
StyledMoreIcon,
15+
StyledScheduleSection
16+
} from "../../styles/Schedule/Schedule.style";
17+
import {StyledLessIcon} from "../../views/Travel/Venue";
18+
19+
const Schedule2024: FC<React.PropsWithChildren<unknown>> = () => {
20+
const { width } = useWindowSize();
21+
22+
React.useEffect(() => {
23+
document.title = `Schedule — ${data.title}${data.edition}`;
24+
25+
fetch("https://sessionize.com/api/v2/w8mdb9k5/view/GridSmart")
26+
.then((value) => value.text())
27+
.then((value) => {
28+
const sched = document.getElementById("#schedule");
29+
if (sched !== null) {
30+
sched.innerHTML = value;
31+
}
32+
})
33+
.catch((err) => Sentry.captureException(err));
34+
}, []);
35+
36+
return (
37+
<SectionWrapper color={Color.WHITE} marginTop={6}>
38+
<StyledScheduleSection>
39+
<TitleSection
40+
title="SCHEDULE"
41+
subtitle="Speakers coming from all corners of the world join us to
42+
share their experience in various technologies and to
43+
invite everyone to participate in Open Source
44+
Technologies and in the JCP."
45+
color={Color.BLUE}
46+
/>
47+
{width > MOBILE_BREAKPOINT && (
48+
<>
49+
<StyledLessIcon src={LessThanBlueWhiteIcon} />
50+
<StyledMoreIcon src={MoreThanBlueWhiteIcon} />
51+
</>
52+
)}
53+
{data.schedule.enabled ? (
54+
<>
55+
<Link
56+
to="/live-view"
57+
style={{
58+
textDecoration: "none",
59+
fontWeight: "bold",
60+
margin: "0.5rem",
61+
}}
62+
>
63+
📅 See Live schedule
64+
</Link>
65+
<div style={{ width: "100%", margin: "0 auto" }} id="#schedule">
66+
&nbsp;
67+
</div>
68+
</>
69+
) : (
70+
<p style={{ color: Color.DARK_BLUE }}>
71+
Schedule is not available yet. Keep in touch on social media as we
72+
announce the speakers and their talks/workshops
73+
</p>
74+
)}
75+
</StyledScheduleSection>
76+
</SectionWrapper>
77+
);
78+
};
79+
80+
export default Schedule2024;
File renamed without changes.

src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ import TalkDetailContainer2024 from "./views/MeetingDetail/TalkDetailContainer20
9797
import SpeakerDetailContainer2024 from "./2024/SpeakerDetail/SpeakerDetailContainer2024";
9898
import CfpSection2024 from "./2024/Cfp/CfpSection2024";
9999
import Workshops from "./views/Workshops/Workshops";
100+
import Schedule2024 from "./2024/Schedule/Schedule2024";
100101

101102
const StyledAppWrapper = styled.div`
102103
position: relative;
@@ -342,7 +343,7 @@ const App: FC<React.PropsWithChildren<unknown>> = () => {
342343
path={ROUTE_2024_SCHEDULE}
343344
element={
344345
<React.Suspense fallback={<Loading />}>
345-
<Schedule2023 />
346+
<Schedule2024 />
346347
</React.Suspense>
347348
}
348349
/>

src/views/Schedule/Schedule.style.ts

Lines changed: 0 additions & 132 deletions
This file was deleted.

src/views/Schedule/Schedule.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import SectionWrapper from "../../components/SectionWrapper/SectionWrapper";
77
import TitleSection from "../../components/SectionTitle/TitleSection";
88
import { useWindowSize } from "react-use";
99
import data from "../../data/2024.json";
10-
import {
11-
StyledLessIcon,
12-
StyledMoreIcon,
13-
StyledScheduleSection,
14-
} from "./Schedule.style";
10+
1511
import * as Sentry from "@sentry/react";
1612
import { Link } from "react-router";
13+
import {
14+
StyledLessIcon, StyledMoreIcon,
15+
StyledScheduleSection
16+
} from "../../styles/Schedule/Schedule.style";
1717

1818
const Schedule: FC<React.PropsWithChildren<unknown>> = () => {
1919
const { width } = useWindowSize();

0 commit comments

Comments
 (0)