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>
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
import Link from "next/link";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Sparkles } from "lucide-react";
|
||||
import { guaNumFromMark } from "@/lib/content/zhouyi";
|
||||
|
||||
export default function GuaFooter({ guaMark }: { guaMark: string }) {
|
||||
export default function GuaFooter({
|
||||
guaMark,
|
||||
guaNum,
|
||||
}: {
|
||||
guaMark: string;
|
||||
guaNum?: string;
|
||||
}) {
|
||||
const num = guaNum ?? guaNumFromMark(guaMark);
|
||||
return (
|
||||
<div className="mt-8 flex flex-wrap gap-3 border-t pt-6">
|
||||
<Button asChild size="sm">
|
||||
<Link href={`/liuyao?gua=${encodeURIComponent(guaMark)}`}>
|
||||
<Link href={`/liuyao?gua=${num}`}>
|
||||
<Sparkles size={16} className="mr-1" />
|
||||
以此卦起卦
|
||||
</Link>
|
||||
|
||||
@@ -24,9 +24,12 @@ function resolveLearnHref(
|
||||
if (href.endsWith("/index.md")) {
|
||||
const mark = href.replace(/\/index\.md$/, "").replace(/^\.\//, "");
|
||||
if (mark.startsWith("other/")) {
|
||||
return `/learn/other/${mark.slice("other/".length)}`;
|
||||
const folder = mark.slice("other/".length);
|
||||
const num = folder.split(".")[0];
|
||||
return `/learn/other/${num}`;
|
||||
}
|
||||
return `${base}/${mark}`;
|
||||
const num = mark.split(".")[0];
|
||||
return `${base}/${num}`;
|
||||
}
|
||||
return href;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user