import * as React from 'react'; import Head from 'next/head'; import Link from 'next/link'; import ListGroup from 'react-bootstrap/ListGroup'; import { Breadcrumb } from 'react-bootstrap'; import { useIntl } from 'react-intl'; import { FormattedMessage } from '../components/localization'; import { VideoOnDemandIndex } from '../util/datatypes/VideoOnDemandIdentifier'; import { getIndex } from '../util/api'; export async function getServerSideProps() { // Fetch VOD IDs and announcements const { announcements, ids } = await getIndex(); return { props: { announcements, ids, }, }; } export default function Home({ announcements, ids }: VideoOnDemandIndex) { const intl = useIntl(); return (
{intl.formatMessage({ id: 'App.title', description: 'The full title of the website', defaultMessage: 'Games Done Quick Instant Archive', })}

{ announcements.map(announcement => (

Announcement: {announcement}

)) } {ids.map(({ id, title }) => (
{title}
))}
); }