698a20a1d4
Client components were importing zhouyi.ts which pulled in fs/promises; move pure helpers to gua-utils.ts and mark zhouyi.ts server-only. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
608 B
TypeScript
25 lines
608 B
TypeScript
import Link from "next/link";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Sparkles } from "lucide-react";
|
|
import { guaNumFromMark } from "@/lib/content/gua-utils";
|
|
|
|
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=${num}`}>
|
|
<Sparkles size={16} className="mr-1" />
|
|
以此卦起卦
|
|
</Link>
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|