import React, { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; import { __ } from '@/lib/i18n'; export default function TabPage() { const { tab } = useParams(); const [schema, setSchema] = useState(null); useEffect(() => { if (!tab) return; fetch(`${(window as any).WNW_API}/settings/${tab}`, { credentials: 'include' }) .then(r => r.json()).then(setSchema); }, [tab]); if (!schema) return
{__('Loading…')}
; return (

{schema.tab}

{schema.fields?.map((f:any, i:number) => (
{f.label}
{f.desc}
{/* super simple fallback render just to verify schema */}
))}
); }