// `/schema-ui` — the SAME notes as `/` (index.tsx), but rendered by the // schema-driven UI components instead of hand-wired hooks. index.tsx wires // useSubscription + useMutation + form state by hand (the reactive baseline); // this page binds to `notes.list` and to `notes.create`. // The columns + fields come straight from the descriptors' effect/Schema, and // validation, live updates, and auto-optimistic come for free — no glue code. // // Delete this page if you don't need it; it's here to show the binding. import { AutoForm, DataTable, Field } from '@voltro/web' import type { PageMeta } from '@voltro/web' import type { ReactNode } from 'react' import { T, useTFn } from '@voltro/i18n' import { getCatalog } from '../../locales/index' const TENANT = 'acme' // Locale-aware tab title (cookie-i18n — @voltro/web hands meta the active locale). export const meta = ({ locale }: { readonly locale: string }): PageMeta => ({ title: getCatalog(locale)['meta.schemaUi.title'], }) const SchemaUiPage = (): ReactNode => { const t = useTFn() return (

{c}, strong: (c: ReactNode) => {c}, code: (c: ReactNode) => {c}, }} />

{c} }} />

{/* Rung 3 — own the layout: show title + body; tenantId is a default. */} {() => ( <> )}

{c} }} />

{/* Columns inferred from the query's output schema; rows are a live subscription that updates on every notes.create. Add a `rowActions` prop once your api defines a per-row mutation (e.g. notes.delete). */}
) } export default SchemaUiPage