"use client"; import { useEffect, useState } from "react"; import { ChevronDown } from "lucide-react"; import { cn } from "@/lib/utils"; import { api } from "@/lib/api"; import { Navbar } from "@/components/public/Navbar"; import { Footer } from "@/components/public/Footer"; import { FaqPageJsonLd } from "@/components/public/JsonLd"; interface FaqItem { id: string; question: string; answer: string; order: number; showOnHomepage: boolean; } export default function FaqPage() { const [items, setItems] = useState([]); const [openIndex, setOpenIndex] = useState(null); const [loading, setLoading] = useState(true); useEffect(() => { api.getFaqsAll() .then((data) => { if (Array.isArray(data)) setItems(data); }) .catch(() => {}) .finally(() => setLoading(false)); }, []); return ( <> {items.length > 0 && ( ({ question: i.question, answer: i.answer }))} /> )}

Frequently Asked Questions

Everything you need to know about the Belgian Bitcoin Embassy.

{loading && (
{[...Array(5)].map((_, i) => (
))}
)} {!loading && items.length === 0 && (

No FAQs available yet.

)} {!loading && items.length > 0 && (
{items.map((item, i) => { const isOpen = openIndex === i; return (

{item.answer}

); })}
)}