diff --git a/components/TestimonyCallout/TestimonyCalloutSection.tsx b/components/TestimonyCallout/TestimonyCalloutSection.tsx new file mode 100644 index 000000000..20dfc4adb --- /dev/null +++ b/components/TestimonyCallout/TestimonyCalloutSection.tsx @@ -0,0 +1,71 @@ +import { Carousel, CarouselItem } from "react-bootstrap" +import { useMediaQuery } from "usehooks-ts" +import { Button, Col, Container, Row } from "../bootstrap" +import { useRecentTestimony } from "../db" +import TestimonyCallout from "./TestimonyCallout" +import { useTranslation } from "next-i18next" +import { Internal } from "components/links" + +export default function TestimonyCalloutSection() { + const recentTestimony = useRecentTestimony(4) + const isMobile = useMediaQuery("(max-width: 768px)") + + const { t } = useTranslation("testimony") + + return ( + + + +

{t("testimonyCalloutSection.peopleSaying")}

+ + +
+ + + +
+ +
+ {isMobile ? ( + + {recentTestimony?.map(testimony => ( + +
+ +
+
+ ))} +
+ ) : ( + + + + {recentTestimony?.map(testimony => ( + + ))} + + + + )} +
+ ) +} \ No newline at end of file diff --git a/pages/index.tsx b/pages/index.tsx index ab692fca6..4a1be6356 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,6 +1,7 @@ import { createPage } from "components/page" import { createGetStaticTranslationProps } from "components/translations" import HeroSection from "components/homepage/HeroSection" +import TestimonyCalloutSection from "components/TestimonyCallout/TestimonyCalloutSection" import DidYouKnowSection from "components/homepage/DidYouKnowSection" import ExplainerSection from "components/homepage/ExplainerSection" import FeaturesSection from "components/homepage/FeaturesSection" @@ -11,6 +12,7 @@ export default createPage({ Page: () => (
+