Straggler fixes: web-next and web-tanstack app callers did not pass {}
to queryOptions()/caller calls after Plan 9 added .input(z.object({}).strict())
to siteSettings and header procedures. All 360 tests pass, full typecheck
green across 14 packages. Refactor log §7 updated with verification summary.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import Link from "next/link";
|
|
import { appRouter } from "@repo/core-api";
|
|
import { bindAllProduction } from "../server/bind-production";
|
|
|
|
export default async function Home() {
|
|
await bindAllProduction();
|
|
const caller = appRouter.createCaller({});
|
|
|
|
const [siteSettings, header, articles] = await Promise.all([
|
|
caller.marketingPages.siteSettings({}),
|
|
caller.navigation.header({}),
|
|
caller.blog.listArticles({ status: "published", limit: 20 }),
|
|
]);
|
|
|
|
return (
|
|
<main>
|
|
<header>
|
|
<h1>{siteSettings.siteName}</h1>
|
|
{siteSettings.siteDescription ? (
|
|
<p>{siteSettings.siteDescription}</p>
|
|
) : null}
|
|
<nav>
|
|
<ul>
|
|
{header.items.map((item) => (
|
|
<li key={item.href}>
|
|
<Link href={item.href}>{item.label}</Link>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
</nav>
|
|
</header>
|
|
|
|
<section>
|
|
<h2>Latest articles</h2>
|
|
{articles.length === 0 ? (
|
|
<p>No published articles yet.</p>
|
|
) : (
|
|
<ul>
|
|
{articles.map((a) => (
|
|
<li key={a.id}>
|
|
<Link href={`/blog/${a.slug}`}>{a.title}</Link>
|
|
</li>
|
|
))}
|
|
</ul>
|
|
)}
|
|
</section>
|
|
</main>
|
|
);
|
|
}
|