"use client" import { useState } from "react" import { useRouter } from "next/navigation" import { ChevronRight, Lock, Unlock, Book, BookOpen, Home, List, Sparkles, User } from "lucide-react" import { useStore } from "@/lib/store" import { bookData, getTotalSectionCount, specialSections } from "@/lib/book-data" export default function ChaptersPage() { const router = useRouter() const { user, hasPurchased } = useStore() const [expandedPart, setExpandedPart] = useState("part-1") const totalSections = getTotalSectionCount() const hasFullBook = user?.hasFullBook || false const handleSectionClick = (sectionId: string) => { router.push(`/read/${sectionId}`) } return (

目录

一场SOUL的创业实验场

来自Soul派对房的真实商业故事

{totalSections}
章节
{/* 目录内容 */}
{bookData.map((part) => (
{expandedPart === part.id && (
{part.chapters.map((chapter) => (
{chapter.title}
{chapter.sections.map((section) => { const isPurchased = hasFullBook || hasPurchased(section.id) const canRead = section.isFree || isPurchased return ( ) })}
))}
)}
))} {/* 附录 */}
附录
{specialSections.appendix.map((item) => ( ))}
) }