/** @jsx jsx */ import { css, jsx } from "@emotion/react"; import { useEffect, useState } from "react"; import HeaderBar from "../components/HeaderBar"; import FormListing from "../components/FormListing"; import Loading from "../components/Loading"; import ScrollToTop from "../components/ScrollToTop"; import { getForms, Form } from "../api/forms"; function LandingPage(): JSX.Element { const [forms, setForms] = useState(); useEffect(() => { const fetchForms = async () => { setForms(await getForms()); }; fetchForms().then(); }, []); if (!forms) { return ; } return

Available Forms

{forms.map(form => ( ))}
; } export default LandingPage;