From 0b2e6ed5a6d806e0f6b836de2c29283a36df08dd Mon Sep 17 00:00:00 2001 From: Dmitry Pokidov <124110+dooman87@users.noreply.github.com> Date: Tue, 27 Feb 2024 22:14:47 +1100 Subject: [PATCH] Colors for agenda and removed old agendas --- components/Agenda/AgendaSession.styled.tsx | 5 +- components/Agenda/AgendaSession.tsx | 2 + pages/agenda/2015.tsx | 229 ---------------- pages/agenda/2016.tsx | 264 ------------------ pages/agenda/2017.tsx | 271 ------------------- pages/agenda/2018.tsx | 298 --------------------- pages/agenda/2019.tsx | 293 -------------------- pages/agenda/2020.tsx | 24 -- pages/agenda/2021.tsx | 268 ------------------ pages/agenda/2022.tsx | 85 ------ 10 files changed, 5 insertions(+), 1734 deletions(-) delete mode 100644 pages/agenda/2015.tsx delete mode 100644 pages/agenda/2016.tsx delete mode 100644 pages/agenda/2017.tsx delete mode 100644 pages/agenda/2018.tsx delete mode 100644 pages/agenda/2019.tsx delete mode 100644 pages/agenda/2020.tsx delete mode 100644 pages/agenda/2021.tsx delete mode 100755 pages/agenda/2022.tsx diff --git a/components/Agenda/AgendaSession.styled.tsx b/components/Agenda/AgendaSession.styled.tsx index c0dd5e01..20ea876e 100644 --- a/components/Agenda/AgendaSession.styled.tsx +++ b/components/Agenda/AgendaSession.styled.tsx @@ -20,9 +20,10 @@ StyledSection.displayName = 'StyledSection' interface StyledAgendaButtonProps { isKeynote?: boolean + color?: string } -export const StyledAgendaButton = styled('button')(({ isKeynote, theme }) => ({ +export const StyledAgendaButton = styled('button')(({ isKeynote, theme, color }) => ({ display: 'flex', width: '100%', height: '100%', @@ -30,7 +31,7 @@ export const StyledAgendaButton = styled('button')(({ i margin: 0, flexDirection: 'column', alignItems: 'stretch', - backgroundColor: '#FFF', + backgroundColor: color || '#FFF', border: 0, cursor: 'pointer', textAlign: isKeynote ? 'center' : 'left', diff --git a/components/Agenda/AgendaSession.tsx b/components/Agenda/AgendaSession.tsx index 0ef11f73..dc6f4399 100644 --- a/components/Agenda/AgendaSession.tsx +++ b/components/Agenda/AgendaSession.tsx @@ -8,6 +8,7 @@ import { StyledSection, StyledSponsor, } from './AgendaSession.styled' +import Conference from 'config/conference' interface AgendaSessionProps { sessionId?: string @@ -45,6 +46,7 @@ export const AgendaSession = ({ type="button" isKeynote={isKeynote} onClick={() => onSelect(session, sponsor, getLivestream(room))} + color={Conference.RoomColors[getRoom(room)]} > {renderPresenters ? ( renderPresenters(presenters) diff --git a/pages/agenda/2015.tsx b/pages/agenda/2015.tsx deleted file mode 100644 index b153c137..00000000 --- a/pages/agenda/2015.tsx +++ /dev/null @@ -1,229 +0,0 @@ -import React from 'react' -import { NextPage, GetStaticProps } from 'next' -import { SafeLink } from 'components/global/safeLink' -import { Sponsors } from 'components/Sponsors/sponsors' -import From2015 from 'config/2015' -import { SponsorType, Session } from 'config/types' -import { - StyledAgendaRowList, - StyledAgendaRow, - StyledTrackHeader, - StyledAddress, - StyledAgendaContainer, -} from 'components/Agenda/Agenda.styled' -import { Agenda } from 'components/Agenda/Agenda' -import { AgendaProvider } from 'components/Agenda/AgendaContext' -import { AgendaTime } from 'components/Agenda/AgendaTime' -import { AgendaSession } from 'components/Agenda/AgendaSession' -import { StyledAgendaPresenter } from 'components/Agenda/AgendaSession.styled' -import { Text } from 'components/global/text' -import { ButtonAnchor } from 'components/global/Button/Button' -import { zonedTimeToUtc } from 'date-fns-tz' -import { set } from 'date-fns' -import { mapSessions } from 'components/utils/mapSession' -import { useConfig } from 'Context/Config' -import { Main } from 'layouts/main' -import AllAgendas from 'components/allAgendas' - -import data from 'public/static/agenda/2015.json' - -type AgendaProps = { - sessions: Session[] - date: string - conferenceInstance: string - numTracks: number -} - -const Agenda2015: NextPage = ({ sessions, conferenceInstance, date, numTracks }) => { - const { conference, dates } = useConfig() - const dateUTC = new Date(date) - - return ( -
-
-

{conferenceInstance} Agenda

- { - return ( - - Tap on a session to see more details... - - -
  • Time
  • -
  • Main Room
  • -
  • Side Room
  • -
    - - - - Registration - - Burswood on Swan -
    1 Camfield Drive, Burswood -
    -
    -
    - - - - Welcome and housekeeping - - - - - ( - Keynote: {presenters} - )} - fullWidth - isKeynote - /> - - - - - Morning tea - - - - - - - - - - - Changeover - - - - - - - - - - - Lunch - - - - - - - - - - - Changeover - - - - - - - - - - - Afternoon tea - - - - - - - - - - - Sponsor announcements and PRIZE DRAW!!! - - - - - ( - Locknote: {presenters} - )} - fullWidth - isKeynote - /> - - - - - - Afterparty -
    - Including thankyous -
    -
    -
    - - - - Event finish - - -
    -
    - ) - }} - /> - -

    Handbook

    - - - Download 2015 Handbook (PDF) - - -

    Media

    - - Picture from 2015 conference registration - - - - Flickr Album - - - s.type === SponsorType.Gold || s.type === SponsorType.Platinum)} - /> - -
    -
    - ) -} - -export const getStaticProps: GetStaticProps = async () => { - const dateUTC = zonedTimeToUtc('2015-08-29T08:30', '+08:00').toJSON() - - return { - props: { - sessions: mapSessions(data), - date: dateUTC, - conferenceInstance: '2015', - numTracks: 2, - }, - } -} - -export default Agenda2015 diff --git a/pages/agenda/2016.tsx b/pages/agenda/2016.tsx deleted file mode 100644 index d3a05f99..00000000 --- a/pages/agenda/2016.tsx +++ /dev/null @@ -1,264 +0,0 @@ -import React from 'react' -import { NextPage, GetStaticProps } from 'next' -import { SafeLink } from 'components/global/safeLink' -import ResponsiveVideo from 'components/responsiveVideo' -import { Sponsors } from 'components/Sponsors/sponsors' -import From2016 from 'config/2016' -import { SponsorType, Session } from 'config/types' -import { Agenda } from 'components/Agenda/Agenda' -import { AgendaProvider } from 'components/Agenda/AgendaContext' -import { - StyledAgendaRowList, - StyledAgendaRow, - StyledTrackHeader, - StyledAddress, - StyledAgendaContainer, - StyledVideoContainer, -} from 'components/Agenda/Agenda.styled' -import { AgendaTime } from 'components/Agenda/AgendaTime' -import { AgendaSession } from 'components/Agenda/AgendaSession' -import { StyledAgendaPresenter } from 'components/Agenda/AgendaSession.styled' -import { Text } from 'components/global/text' -import { ButtonAnchor } from 'components/global/Button/Button' -import { zonedTimeToUtc } from 'date-fns-tz' -import { set } from 'date-fns' -import { mapSessions } from 'components/utils/mapSession' -import { Main } from 'layouts/main' -import { useConfig } from 'Context/Config' -import AllAgendas from 'components/allAgendas' - -import data from 'public/static/agenda/2016.json' - -type AgendaProps = { - sessions: Session[] - date: string - conferenceInstance: string - numTracks: number -} - -const Agenda2016: NextPage = ({ sessions, conferenceInstance, date, numTracks }) => { - const { conference, dates } = useConfig() - const dateUTC = new Date(date) - - return ( -
    -
    -

    {conferenceInstance} Agenda

    - { - return ( - - Tap on a session to see more details... - - -
  • Time
  • -
  • Main Room
  • -
  • Side Room 1
  • -
  • Side Room 2
  • -
    - - - - Registration - - Mercure Perth -
    - 10 Irwin St, Perth -
    -
    -
    - - - - Welcome and housekeeping - - - - - ( - Keynote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Changeover - - - - - - - - - - - - Morning tea - - - - - - - - - - - - Changeover - - - - - - - - - - - - Lunch - - - - - - - - - - - - - - - - Changeover - - - - - - - - - - - - Afternoon tea - - - - - - Sponsor announcements and PRIZE DRAW!!! - - - - - ( - Locknote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Thank yous and wrap up - - - - - - Afterparty - - My Place Bar & Restaurant -
    - 70 Pier Street, Perth -
    -
    -
    -
    -
    - ) - }} - /> - -

    Handbook

    - - - Download 2015 Handbook (PDF) - - - -

    Media

    - - - - - - - - YouTube Playlist - {' '} - |{' '} - - Flickr Album - - - - s.type === SponsorType.Gold || s.type === SponsorType.Platinum)} - /> - -
    -
    - ) -} - -export const getStaticProps: GetStaticProps = async () => { - const dateUTC = zonedTimeToUtc('2016-08-27T08:30', '+08:00').toJSON() - - return { - props: { - sessions: mapSessions(data), - date: dateUTC, - conferenceInstance: '2016', - numTracks: 3, - }, - } -} - -export default Agenda2016 diff --git a/pages/agenda/2017.tsx b/pages/agenda/2017.tsx deleted file mode 100644 index fcff5ee6..00000000 --- a/pages/agenda/2017.tsx +++ /dev/null @@ -1,271 +0,0 @@ -import React from 'react' -import { NextPage, GetStaticProps } from 'next' -import { Session, SponsorType } from 'config/types' -import From2017 from 'config/2017' -import ResponsiveVideo from 'components/responsiveVideo' -import { SafeLink } from 'components/global/safeLink' -import { Sponsors } from 'components/Sponsors/sponsors' -import { Agenda } from 'components/Agenda/Agenda' -import { AgendaProvider } from 'components/Agenda/AgendaContext' -import { - StyledAgendaRowList, - StyledAgendaRow, - StyledTrackHeader, - StyledAddress, - StyledAgendaContainer, - StyledVideoContainer, -} from 'components/Agenda/Agenda.styled' -import { AgendaTime } from 'components/Agenda/AgendaTime' -import { AgendaSession } from 'components/Agenda/AgendaSession' -import { StyledAgendaPresenter } from 'components/Agenda/AgendaSession.styled' -import { Text } from 'components/global/text' -import { ButtonAnchor } from 'components/global/Button/Button' -import { zonedTimeToUtc } from 'date-fns-tz' -import { set } from 'date-fns' -import { Main } from 'layouts/main' -import { useConfig } from 'Context/Config' -import AllAgendas from 'components/allAgendas' -import { mapSessions } from 'components/utils/mapSession' - -import data from 'public/static/agenda/2017.json' - -type AgendaProps = { - sessions: Session[] - date: string - conferenceInstance: string - numTracks: number -} - -const Agenda2017: NextPage = ({ sessions, conferenceInstance, date, numTracks }) => { - const { conference, dates } = useConfig() - const dateUTC = new Date(date) - - return ( -
    -
    -

    {conferenceInstance} Agenda

    - - { - return ( - - Tap on a session to see more details... - - -
  • Time
  • -
  • RR5
  • -
  • M6
  • -
  • RR4
  • -
    - - - - Registration - - Perth Convention and Exhibition Centre -
    - 21 Mounts Bay Rd, Perth -
    -
    -
    - - - - Welcome and housekeeping - - - - - ( - Keynote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Morning tea - - - - - - - - - - - - Changeover - - - - - - - - - - - - Changeover - - - - - - - - - - - - - - - - - - Lunch - - - - - - - - - - - - - - - - - - Changeover - - - - - - - - - - - - Afternoon tea - - - - Afternoon tea - - - - - - Sponsor announcements and PRIZE DRAW!!! - - - - - ( - Locknote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Thank yous and wrap up - - - - - - Afterparty - - @Liberty Cafe & Bar -
    - 21 Mounts Bay Rd, Perth -
    -
    -
    -
    -
    - ) - }} - /> - -

    Handbook

    - - - Download 2017 handbook (PDF) - - - -

    Media

    - - - - - - - - YouTube Playlist - {' '} - |{' '} - - Flickr Album - - - s.type === SponsorType.Gold || s.type === SponsorType.Platinum)} - /> - -
    -
    - ) -} - -export const getStaticProps: GetStaticProps = async () => { - const dateUTC = zonedTimeToUtc('2017-09-16T08:00', '+08:00').toJSON() - - return { - props: { - sessions: mapSessions(data), - date: dateUTC, - conferenceInstance: '2017', - numTracks: 3, - }, - } -} - -export default Agenda2017 diff --git a/pages/agenda/2018.tsx b/pages/agenda/2018.tsx deleted file mode 100644 index fd9dc0db..00000000 --- a/pages/agenda/2018.tsx +++ /dev/null @@ -1,298 +0,0 @@ -import React from 'react' -import { NextPage, GetStaticProps } from 'next' -import { zonedTimeToUtc } from 'date-fns-tz' -import { set } from 'date-fns' -import { Sponsors } from 'components/Sponsors/sponsors' -import From2018 from 'config/2018' -import { SponsorType, Session } from 'config/types' -import ResponsiveVideo from 'components/responsiveVideo' -import { SafeLink } from 'components/global/safeLink' -import { Agenda } from 'components/Agenda/Agenda' -import { AgendaProvider } from 'components/Agenda/AgendaContext' -import { - StyledAgendaRowList, - StyledAgendaRow, - StyledTrackHeader, - StyledAddress, - StyledAgendaContainer, - StyledVideoContainer, -} from 'components/Agenda/Agenda.styled' -import { AgendaTime } from 'components/Agenda/AgendaTime' -import { AgendaSession } from 'components/Agenda/AgendaSession' -import { StyledAgendaPresenter } from 'components/Agenda/AgendaSession.styled' -import { Text } from 'components/global/text' -import { ButtonAnchor } from 'components/global/Button/Button' -import { Main } from 'layouts/main' -import { useConfig } from 'Context/Config' -import AllAgendas from 'components/allAgendas' - -import data from 'public/static/agenda/2018.json' - -type AgendaProps = { - sessions: Session[] - date: string - conferenceInstance: string - numTracks: number -} - -const Agenda2018: NextPage = ({ sessions, date, conferenceInstance, numTracks }) => { - const { conference, dates } = useConfig() - const dateUTC = new Date(date) - - return ( -
    -
    -

    {conferenceInstance} Agenda

    - - { - return ( - - Tap on a session to see more details... - - -
  • Time
  • -
  • RR4
  • -
  • M3
  • -
  • M2
  • -
  • M1
  • -
    - - - - Registration - - Perth Convention and Exhibition Centre -
    - 21 Mounts Bay Rd, Perth -
    -
    -
    - - - - Welcome and housekeeping - - - - - - Welcome to country - - - - - ( - Keynote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Changeover - - - - - - - - - - - - - Morning tea - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - Lunch - - - - - ( - Lunchnote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Lunch (continued) - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - Afternoon tea - - - - - - Prize Draw - - - - - ( - Locknote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Thank yous and wrap up - - - - - - Afterparty - - -
    -
    - ) - }} - /> - -

    Handbook

    - - - Download 2018 handbook (PDF) - - - -

    Media

    - - - - - - - - - YouTube Playlist - {' '} - |{' '} - - Flickr Album - - - s.type === SponsorType.Gold || s.type === SponsorType.Platinum)} - /> - - -
    -
    - ) -} - -export const getStaticProps: GetStaticProps = async () => { - const dateUTC = zonedTimeToUtc('2018-08-04T08:00', '+08:00').toJSON() - - return { - props: { - sessions: data, - date: dateUTC, - conferenceInstance: '2018', - numTracks: 4, - }, - } -} - -export default Agenda2018 diff --git a/pages/agenda/2019.tsx b/pages/agenda/2019.tsx deleted file mode 100644 index 71f5dd07..00000000 --- a/pages/agenda/2019.tsx +++ /dev/null @@ -1,293 +0,0 @@ -import React from 'react' -import { NextPage, GetStaticProps } from 'next' -import { From2019 } from 'config/2019' -import { Agenda } from 'components/Agenda/Agenda' -import { AgendaProvider } from 'components/Agenda/AgendaContext' -import { - StyledAgendaRowList, - StyledAgendaRow, - StyledTrackHeader, - StyledAddress, - StyledAgendaContainer, - StyledVideoContainer, -} from 'components/Agenda/Agenda.styled' -import { AgendaTime } from 'components/Agenda/AgendaTime' -import { AgendaSession } from 'components/Agenda/AgendaSession' -import { StyledAgendaPresenter } from 'components/Agenda/AgendaSession.styled' -import { Session, SponsorType } from 'config/types' -import { Sponsors } from 'components/Sponsors/sponsors' -import ResponsiveVideo from 'components/responsiveVideo' -import { SafeLink } from 'components/global/safeLink' -import { Text } from 'components/global/text' -import { ButtonAnchor } from 'components/global/Button/Button' -import { zonedTimeToUtc } from 'date-fns-tz' -import { set } from 'date-fns' -import { useConfig } from 'Context/Config' -import { Main } from 'layouts/main' -import AllAgendas from 'components/allAgendas' - -import data from 'public/static/agenda/2019.json' - -type AgendaProps = { - sessions: Session[] - date: string - conferenceInstance: string -} - -const Agenda2019: NextPage = ({ sessions, date, conferenceInstance }) => { - const { conference, dates } = useConfig() - const dateUTC = new Date(date) - - return ( -
    -
    -

    {conferenceInstance} Agenda

    - - { - return ( - - Tap on a session to see more details... - - -
  • Time
  • -
  • Theatre
  • -
  • RR5
  • -
  • M6
  • -
  • M7
  • -
  • M8
  • -
  • M9
  • -
    - - - - Registration - - Perth Convention and Exhibition Centre -
    - 21 Mounts Bay Rd, Perth -
    -
    -
    - - - - Welcome and housekeeping - - - - - - Welcome to country - - - - - ( - Keynote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Changeover - - - - - - - - - - - - - - - Morning tea - - - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - - - Lunch - - - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - - - Afternoon tea - - - - - - Prize Draw - - - - - ( - Locknote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Thank yous and wrap up - - - - - - Afterparty - - -
    -
    - ) - }} - /> - -

    Handbook

    - - - Download 2019 handbook (PDF) - - - -

    Media

    - - - - - - - - YouTube Playlist - {' '} - |{' '} - - Flickr Album - - - - s.type === SponsorType.Gold || s.type === SponsorType.Platinum)} - /> - - -
    -
    - ) -} - -export const getStaticProps: GetStaticProps = async () => { - const dateUTC = zonedTimeToUtc('2019-08-03T08:00', '+08:00').toJSON() - - return { - props: { - sessions: data, - date: dateUTC, - conferenceInstance: '2019', - }, - } -} - -export default Agenda2019 diff --git a/pages/agenda/2020.tsx b/pages/agenda/2020.tsx deleted file mode 100644 index 827f3459..00000000 --- a/pages/agenda/2020.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react' -import { PageWithSidebar } from 'layouts/withSidebar' -import AllAgendas from 'components/allAgendas' -import { Text } from 'components/global/text' -import { NextPage } from 'next' -import { useConfig } from 'Context/Config' - -const Agenda2020: NextPage = () => { - const { conference, dates } = useConfig() - - return ( - -

    DDD Perth 2020

    - - DDD Perth 2020 did not happen. The safety of all participants, from sponsors to speakers to attendees to - volunteers, is our priority and we felt we could better serve our community by postponing the event. - - - -
    - ) -} - -export default Agenda2020 diff --git a/pages/agenda/2021.tsx b/pages/agenda/2021.tsx deleted file mode 100644 index 0057002a..00000000 --- a/pages/agenda/2021.tsx +++ /dev/null @@ -1,268 +0,0 @@ -import React from 'react' -import { NextPage, GetStaticProps } from 'next' -import { From2021 } from 'config/2021' -import { Agenda } from 'components/Agenda/Agenda' -import { AgendaProvider } from 'components/Agenda/AgendaContext' -import { - StyledAgendaRowList, - StyledAgendaRow, - StyledTrackHeader, - StyledAddress, - StyledAgendaContainer, - StyledVideoContainer, -} from 'components/Agenda/Agenda.styled' -import { AgendaTime } from 'components/Agenda/AgendaTime' -import { AgendaSession } from 'components/Agenda/AgendaSession' -import { StyledAgendaPresenter } from 'components/Agenda/AgendaSession.styled' -import { Session, SponsorType } from 'config/types' -import { Sponsors } from 'components/Sponsors/sponsors' -import ResponsiveVideo from 'components/responsiveVideo' -import { SafeLink } from 'components/global/safeLink' -import { Text } from 'components/global/text' -import { ButtonAnchor } from 'components/global/Button/Button' -import { zonedTimeToUtc } from 'date-fns-tz' -import { set } from 'date-fns' -import { useConfig } from 'Context/Config' -import { Main } from 'layouts/main' -import AllAgendas from 'components/allAgendas' - -import data from 'public/static/agenda/2021.json' - -type AgendaProps = { - sessions: Session[] - date: string - conferenceInstance: string -} - -const Agenda2021: NextPage = ({ sessions, date, conferenceInstance }) => { - const { conference, dates } = useConfig() - const dateUTC = new Date(date) - - return ( -
    -
    -

    {conferenceInstance} Agenda

    - - { - return ( - - Tap on a session to see more details... - - -
  • Time
  • -
  • Riverside Theatre
  • -
  • M6
  • -
  • M7
  • -
  • M8
  • -
    - - - - Registration - - Perth Convention and Exhibition Centre -
    - 21 Mounts Bay Rd, Perth -
    -
    -
    - - - - Welcome and housekeeping - - - - - - Welcome to Country - - - - - ( - Keynote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Changeover - - - - - - - - - - - - - Morning tea - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - Lunch - - - - - - - - - - - - - Changeover - - - - - - - - - - - - - Afternoon tea - - - - - - Prize Draw - - - - - ( - Locknote: {presenters} - )} - fullWidth - isKeynote - alwaysShowRoom - /> - - - - - Thank yous and wrap up - - -
    -
    - ) - }} - /> - -

    Handbook

    - - - Download 2021 handbook (PDF) - - - -

    Media

    - - - - - - - - YouTube Playlist - {' '} - |{' '} - - Flickr Album - - - - s.type === SponsorType.Gold || s.type === SponsorType.Platinum)} - /> - - -
    -
    - ) -} - -export const getStaticProps: GetStaticProps = async () => { - const dateUTC = zonedTimeToUtc('2021-08-14T08:00', '+08:00').toJSON() - - return { - props: { - sessions: data, - date: dateUTC, - conferenceInstance: '2021', - }, - } -} - -export default Agenda2021 diff --git a/pages/agenda/2022.tsx b/pages/agenda/2022.tsx deleted file mode 100755 index 26019aff..00000000 --- a/pages/agenda/2022.tsx +++ /dev/null @@ -1,85 +0,0 @@ -import React from 'react' -import AllAgendas from 'components/allAgendas' -import { CurrentAgenda } from 'components/currentAgenda' -import { Sponsors } from 'components/Sponsors/sponsors' -import { fetchSessions } from 'components/utils/useSessions' -import conference from 'config/2022' -import { Session, SponsorType } from 'config/types' -import { Main } from 'layouts/agendaWide' -import { GetServerSideProps, NextPage } from 'next' -import { formatInTimeZone } from 'date-fns-tz' -import dateTimeProvider from 'components/utils/dateTimeProvider' -import getConferenceDates from 'config/dates' - -interface AgendaPageProps { - sessions?: Session[] - sessionId?: string -} - -const AgendaPage: NextPage = ({ sessions, sessionId }) => { - const [currentDate] = React.useState(dateTimeProvider.now()) - const dates = getConferenceDates(conference, currentDate) - - return ( -
    -
    -

    {dates.IsComplete && conference.Instance} Agenda

    - - {!dates.AgendaPublished && ( -

    - The agenda has not yet been finalised; please come back on{' '} - {formatInTimeZone(conference.AgendaPublishedFrom, conference.TimeZone, dates.DateDisplayFormat)}{' '} - {formatInTimeZone(conference.AgendaPublishedFrom, conference.TimeZone, dates.TimeDisplayFormat)}. In the - meantime, check out our previous agendas below. -

    - )} - {dates.AgendaPublished && ( - - )} - {conference.Handbook && ( - -

    Handbook

    -

    - - Download handbook (PDF) - -

    -
    - )} - s.type === SponsorType.Gold || s.type === SponsorType.Platinum)} - /> - -
    -
    - ) -} - -export const getServerSideProps: GetServerSideProps = async (context) => { - // const { dates } = getCommonServerSideProps(context) - - // if (!dates.VotingFinished) { - // return { redirect: { destination: `/agenda/${Conference.PreviousInstance}`, permanent: false } } - // } - - const sessions = await fetchSessions(process.env.NEXT_PUBLIC_GET_AGENDA_URL) - const sessionId = context.query.sessionId - - return { - props: { - ...(sessions ? { sessions } : {}), - ...(sessionId ? { sessionId } : {}), - }, - } -} - -export default AgendaPage