import type { NextPage } from "next";
import Head from "next/head";
import { ComeFunziona } from "~/components/come_funziona";
import {
Accordion,
AccordionContent,
AccordionItem,
AccordionTrigger,
} from "~/components/ui/accordion";
import { Badge } from "~/components/ui/badge";
import { Button } from "~/components/ui/button";
import { useTranslation } from "~/providers/I18nProvider";
/**
* Pagina guida: /guida
*/
const Guida: NextPage = () => {
const { t } = useTranslation();
return (
<>
{t.heads.guida_titolo}
{t.guida}
>
);
};
export default Guida;
const FAQSection = () => {
const { t } = useTranslation();
const handleScroll = (id: string) => {
document.getElementById(id)?.scrollIntoView({
behavior: "smooth",
});
window.history.replaceState({}, "", `${window.location.pathname}#${id}`);
};
if (!t.faq?.domande) {
return null; // Ensure translations are loaded before rendering
}
return (
{t.faq.titolo}
{t.faq.descrizione}
{t.faq.domande.map((item) => (
))}
{t.faq.domande.map((item) => (
{item.label}
{item.qas.map((f, i) => (
i
}`}
value={i.toString()}
>
{f.title}
{f.description}
))}
))}
);
};