mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
Each drew a centred hero of its own. The code each page already had now stands beside the words: the handler on /functions, the three-way split on /treasury (its band lower down said it again and is gone), the CLI session on /dns (likewise). /payments walks a payment's route and /zap the protocol's four facts. The stat tiles that said little (Auto Sweep, Real-time Recon, 5+ Providers) are gone with the old heroes.
26 lines
564 B
TypeScript
26 lines
564 B
TypeScript
import { Code } from '@/components/code'
|
|
import Functions from './view'
|
|
|
|
const HANDLER = `export async function handler(req, res) {
|
|
// Process incoming data
|
|
const { data } = await req.json();
|
|
const result = await processData(data);
|
|
|
|
// Return JSON response
|
|
return Response.json({
|
|
success: true,
|
|
data: result
|
|
})
|
|
}`
|
|
|
|
/** The page, with its handler highlighted where it is built (components/code). */
|
|
export default function Page() {
|
|
return (
|
|
<Functions
|
|
handler={
|
|
<Code lang="javascript" code={HANDLER} />
|
|
}
|
|
/>
|
|
)
|
|
}
|