"use client"; import { useEffect, useState } from "react"; import Link from "next/link"; type Language = { id: string; name: string }; export default function LanguageList() { const [items, setItems] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { async function load() { try { const res = await fetch("/api/zxdb/languages", { cache: "no-store" }); const json = await res.json(); setItems(json.items ?? []); } finally { setLoading(false); } } load(); }, []); if (loading) return
Loading…
; return (

Languages

); }