diff --git a/src/templates/schedule.tsx b/src/templates/schedule.tsx index 34b67516c5..17b8246413 100644 --- a/src/templates/schedule.tsx +++ b/src/templates/schedule.tsx @@ -8,47 +8,9 @@ import ScheduleList, { ScheduleSession, } from "../components/Conf/Schedule/ScheduleList" -const fetchData = async (url: string) => { - try { - const response = await fetch(url, { - method: "POST", - headers: { - "Content-Type": "application/json", - "User-Agent": "GraphQL Conf / GraphQL Foundation", - }, - }) - const data = await response.json() - return data - } catch (error: any) { - throw new Error( - `Error fetching data from ${url}: ${error.message || error.toString()}` - ) - } -} - -export async function getServerData() { - try { - const schedule: ScheduleSession[] = await fetchData( - `https://graphqlconf23.sched.com/api/session/list?api_key=${process.env.SCHED_ACCESS_TOKEN}&format=json` - ) - - return { - props: { - schedule, - }, - } - } catch (error) { - return { - status: 500, - headers: {}, - props: {}, - } - } -} - -const ScheduleTemplate: FC< - PageProps<{}, {}, {}, { schedule: ScheduleSession[] }> -> = ({ serverData: { schedule } }) => { +const ScheduleTemplate: FC> = ({ + pageContext: { schedule }, +}) => { return ( diff --git a/src/templates/videos.ts b/src/templates/videos.ts index c5f07aeb28..9d4a6358ea 100644 --- a/src/templates/videos.ts +++ b/src/templates/videos.ts @@ -292,10 +292,6 @@ export const videos = [ id: "IBMf4G7-xE8", title: `Miles Bardon - Improving the GraphQL developer experience on LEGO.com`, }, - { - id: "bmdWEydYas8", - title: `Jamie Barton - Unify Data Sources at the Edge with GraphQL`, - }, { id: "XX05BNMl7lo", title: `Darrell Warde - A journey through the GraphQL validation system`,