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 { Button } from "~/components/ui/button";
import { useTranslation } from "~/providers/I18nProvider";
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, index) => (
))}
{t.faq.domande.map((item, index) => (
{item.label}
{item.qas.map((f, i) => (
{f.title}
{f.description}
))}
))}
);
};