Fix Docker build by splitting client-safe gua utils from fs-based content loader.
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>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Link from "next/link";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Sparkles } from "lucide-react";
|
||||
import { guaNumFromMark } from "@/lib/content/zhouyi";
|
||||
import { guaNumFromMark } from "@/lib/content/gua-utils";
|
||||
|
||||
export default function GuaFooter({
|
||||
guaMark,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Link from "next/link";
|
||||
import Markdown from "react-markdown";
|
||||
import type { LearnVariant } from "@/lib/content/zhouyi";
|
||||
import type { LearnVariant } from "@/lib/content/gua-utils";
|
||||
|
||||
function resolveLearnHref(
|
||||
href: string | undefined,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { guaNumFromMark } from "@/lib/content/zhouyi";
|
||||
import { guaNumFromMark } from "@/lib/content/gua-utils";
|
||||
|
||||
export interface ResultObj {
|
||||
guaTitle: string;
|
||||
|
||||
Reference in New Issue
Block a user