|
| 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 | + |
| 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; |
0 commit comments