import Head from "next/head"; import { useTranslate } from "react-polyglot"; import { NextPage, GetServerSideProps, GetServerSidePropsContext } from "next"; import { Box, Grid } from "@mui/material"; import { Layout } from "components/Layout"; import { PageHeader } from "components/PageHeader"; import { Question } from "components/Question"; import { useAppContext } from "components/AppProvider"; import FaqHeader from "images/faq-header.svg"; import { getEmbedded } from "lib/utils"; type FAQProps = { embedded: boolean; }; const FAQ: NextPage = ({ embedded }) => { const t = useTranslate(); const { colors: { lavender }, typography: { h1, h4, p }, } = useAppContext(); const questions = [ { question: t("whatIsLeafcutterQuestion"), answer: t("whatIsLeafcutterAnswer"), }, { question: t("whoBuiltLeafcutterQuestion"), answer: t("whoBuiltLeafcutterAnswer"), }, { question: t("whoCanUseLeafcutterQuestion"), answer: t("whoCanUseLeafcutterAnswer"), }, { question: t("whatCanYouDoWithLeafcutterQuestion"), answer: t("whatCanYouDoWithLeafcutterAnswer"), }, { question: t("whereIsTheDataComingFromQuestion"), answer: t("whereIsTheDataComingFromAnswer"), }, { question: t("whereIsTheDataStoredQuestion"), answer: t("whereIsTheDataStoredAnswer"), }, { question: t("howDoWeKeepTheDataSafeQuestion"), answer: t("howDoWeKeepTheDataSafeAnswer"), }, { question: t("howLongDoYouKeepTheDataQuestion"), answer: t("howLongDoYouKeepTheDataAnswer"), }, { question: t("whatOrganizationsAreParticipatingQuestion"), answer: t("whatOrganizationsAreParticipatingAnswer"), }, { question: t("howDidYouGetMyProfileInformationQuestion"), answer: t("howDidYouGetMyProfileInformationAnswer"), }, { question: t("howCanILearnMoreAboutLeafcutterQuestion"), answer: t("howCanILearnMoreAboutLeafcutterAnswer"), }, ]; return ( Digital Threat Dashboard – Leafcutter {t("frequentlyAskedQuestionsTitle")} {t("frequentlyAskedQuestionsSubtitle")} {t("frequentlyAskedQuestionsDescription")} {questions.map((q: any, index: number) => ( ))} ); }; export default FAQ; export const getServerSideProps: GetServerSideProps = async ( context: GetServerSidePropsContext ) => ({ props: { embedded: getEmbedded(context) } });