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'; import { GetServerSideProps, NextPage } from 'next'; interface HomeProps { index: VideoOnDemandIndex } export const getServerSideProps: GetServerSideProps = async () => { // Fetch VOD IDs and announcements return { props: { index: await getIndex(), }, }; } const Home: NextPage = ({ index: { announcements, ids } }) => { const intl = useIntl(); return (
{intl.formatMessage({ id: 'App.title', description: 'The full title of the website', defaultMessage: 'Games Done Quick Instant Archive', })}

{ announcements.map((text, id) => (

Announcement: {text}

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