Files
zhimingge/app/learn/page.tsx
T
dekun a487b17165 Fix learn 404, coin animation, full regions, and AI key errors.
Use numeric /learn/{num} routes, register Tailwind coin animations with方孔铜钱 UI, expand to 34 provinces, and surface missing OPENAI_API_KEY clearly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 21:32:20 +08:00

56 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Link from "next/link";
import PageShell from "@/components/page-shell";
import {
getGuaName,
guaNumFromMark,
listGuaMarks,
} from "@/lib/content/zhouyi";
export default async function LearnPage() {
const guaMarks = await listGuaMarks("traditional");
return (
<PageShell className="max-w-3xl px-4 py-8">
<div className="mb-6">
<h1 className="text-2xl font-bold"></h1>
<p className="mt-2 text-muted-foreground">
</p>
<Link
href="/learn/other"
className="mt-2 inline-block text-sm text-primary underline underline-offset-4"
>
</Link>
</div>
<div className="overflow-x-auto rounded-lg border">
<table className="w-full text-sm">
<thead className="bg-muted/50">
<tr>
<th className="px-4 py-2 text-left font-medium"></th>
<th className="px-4 py-2 text-left font-medium"></th>
</tr>
</thead>
<tbody>
{guaMarks.map((mark) => (
<tr key={mark} className="border-t">
<td className="px-4 py-2 font-mono text-muted-foreground">
{guaNumFromMark(mark)}
</td>
<td className="px-4 py-2">
<Link
href={`/learn/${guaNumFromMark(mark)}`}
className="text-primary underline-offset-4 hover:underline"
>
{getGuaName(mark)}
</Link>
</td>
</tr>
))}
</tbody>
</table>
</div>
</PageShell>
);
}