import type { AppInfo, LibInfo } from "akanjs"; export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { appName: string }) { return { filename: "Task.Zone.tsx", content: `"use client"; import { type cnst, Task, usePage } from "@apps/${dict.appName}/client"; import type { ClientInit, ClientView } from "akanjs/fetch"; import { Link, Load } from "akanjs/ui"; // ===== Task.Zone.tsx ===== // Convention: lib// — PascalCase .tsx, Zone suffix = composition layer between pages and UI. // Zone components use Load.Units / Load.View from akanjs/ui — the framework convention for data-bound zones. // Takes ClientInit / ClientView props from page loader — data is fetched server-side. // Uses usePage().l() for i18n — the framework convention for dictionary-based translations. // Invoked directly from page components: , . interface CardProps { className?: string; init: ClientInit<"task", cnst.LightTask>; } export const Card = ({ className, init }: CardProps) => { const { l } = usePage(); return ( (
{l("task.taskNoTasks")}
)} renderItem={(task) => } /> ); }; interface ViewProps { className?: string; view: ClientView<"task", cnst.Task>; } export const View = ({ className, view }: ViewProps) => { return } />; }; `, }; }