···11+"use client";
22+33+import { allFAQs } from "contentlayer/generated";
44+15import {
26 Accordion,
37 AccordionContent,
···59 AccordionTrigger,
610} from "@openstatus/ui";
71188-import { Shell } from "@/components/dashboard/shell";
99-1010-// REMINDER: we can create a contentlayer document and the faq into it
1111-const faqsConfig: Record<"q" | "a", string>[] = [
1212- {
1313- q: "What are the limits?",
1414- a: "You will start with a free plan by default which includes a total of <strong>3 monitors</strong> and <strong>1 status</strong> page as well as cron jobs of either <code>10m</code>, <code>30m</code> or <code>1h</code>.<br />Learn more about our <a href='/pricing'>pricing</a>.",
1515- },
1616- {
1717- q: "Who are we?",
1818- a: "We are <a href='https://twitter.com/thibaultleouay' target='_blank'>Thibault</a> and <a href='https://twitter.com/mxkaske' target='_blank'>Max</a>.",
1919- },
2020- {
2121- q: "How does it work?",
2222- a: "We ping your endpoints from multiple regions to calculate uptime. We display the status on your status page.",
2323- },
2424- {
2525- q: "What regions do we support?",
2626- a: "We support one region for each continent to allow multi-regions monitoring.",
2727- },
2828- {
2929- q: "How can I help?",
3030- a: "You can star our project on <a href='https://github.com/openstatusHQ/openstatus'>GitHub</a>, or contribute to it. Or you can also become a <strong>Pro</strong> user.",
3131- },
3232-];
1212+import { Mdx } from "../content/mdx";
1313+import {
1414+ CardContainer,
1515+ CardDescription,
1616+ CardHeader,
1717+ CardIcon,
1818+ CardTitle,
1919+} from "./card";
33203421export function FAQs() {
2222+ const faqs = allFAQs.sort((a, b) => a.order - b.order);
3523 return (
3636- <Shell className="grid gap-1">
3737- <h2 className="text-foreground font-cal text-center text-2xl">FAQ</h2>
3838- <Accordion type="single" collapsible className="w-full">
3939- {faqsConfig.map(({ q, a }, i) => (
4040- <AccordionItem key={i} value={`item-${i}`}>
4141- <AccordionTrigger>{q}</AccordionTrigger>
4242- <AccordionContent>
4343- <div
4444- className="prose dark:prose-invert prose-sm"
4545- dangerouslySetInnerHTML={{ __html: a }}
4646- />
4747- </AccordionContent>
4848- </AccordionItem>
4949- ))}
5050- </Accordion>
5151- </Shell>
2424+ <CardContainer>
2525+ <CardHeader>
2626+ <CardIcon icon="message-circle" />
2727+ <CardTitle>FAQs</CardTitle>
2828+ <CardDescription>
2929+ What you want to know about OpenStatus.
3030+ </CardDescription>
3131+ </CardHeader>
3232+ <div>
3333+ <Accordion type="single" collapsible className="w-full">
3434+ {faqs.map((faq, i) => (
3535+ <AccordionItem key={i} value={`item-${i}`}>
3636+ <AccordionTrigger>{faq.title}</AccordionTrigger>
3737+ <AccordionContent>
3838+ <Mdx code={faq.body.code} />
3939+ </AccordionContent>
4040+ </AccordionItem>
4141+ ))}
4242+ </Accordion>
4343+ </div>
4444+ </CardContainer>
5245 );
5346}
···9191 },
9292 {
9393 icon: "zap",
9494- catchline: "Escalatation.",
9494+ catchline: "Escalation.",
9595 description: "Notify and escalate an alert to the right team member.",
9696 badge: "Coming soon",
9797 },
+9
apps/web/src/content/faq/about-us.mdx
···11+---
22+title: Who are we?
33+order: 2
44+---
55+66+{/* TODO: write markdown */}
77+88+We are <a href='https://twitter.com/thibaultleouay' target='_blank'>Thibault</a>
99+and <a href='https://twitter.com/mxkaske' target='_blank'>Max</a>.
+7
apps/web/src/content/faq/functioning.mdx
···11+---
22+title: How does it work?
33+order: 3
44+---
55+66+We ping your endpoints from multiple regions to calculate uptime. We display the
77+status on your status page.
+10
apps/web/src/content/faq/help.mdx
···11+---
22+title: How can I help?
33+order: 5
44+---
55+66+{/* TODO: write markdown */}
77+88+You can star our project on
99+<a href="https://github.com/openstatusHQ/openstatus">GitHub</a>, or contribute
1010+to it. Or you can also become a <strong>Pro</strong> user.
+11
apps/web/src/content/faq/limits.mdx
···11+---
22+title: What are the limits?
33+order: 1
44+---
55+66+{/* TODO: write markdown */}
77+88+You will start with a free plan by default which includes a total of <strong>3
99+monitors</strong> and <strong>1 status</strong> page as well as cron jobs of
1010+either <code>10m</code>, <code>30m</code> or <code>1h</code>.<br />Learn more
1111+about our <a href='/pricing'>pricing</a>.
+6
apps/web/src/content/faq/supported-regions.mdx
···11+---
22+title: What regions do we support?
33+order: 4
44+---
55+66+We support one region for each continent to allow multi-regions monitoring.