import { useEffect } from "react";
import Head from "next/head";
import ReaderNav from "../../components/reader/ReaderNav";
import ReaderFooter from "../../components/reader/ReaderFooter";
import WorkflowBlock from "../../components/reader/WorkflowBlock";
import useActivation from "../../components/reader/useActivation";
import { CHAPTER, RECIPES } from "../../data/sample-chapter";
const RECIPE_IDS = RECIPES.map((r) => r.id);
function Essay({ heading, paragraphs }) {
return (
{heading}
{paragraphs.map((p) => (
{p}
))}
);
}
export default function RealEstateChapter() {
const { complete, toggle, count, total } = useActivation(RECIPE_IDS);
const [first, second] = RECIPES;
useEffect(() => {
const hash = window.location.hash;
if (!hash) return;
const el = document.getElementById(hash.slice(1));
if (el) el.scrollIntoView({ behavior: "smooth", block: "start" });
}, []);
return (
<>
{CHAPTER.title} — AIBook.fun reading demo
Reading demo · not the live book
{CHAPTER.vertical} · {CHAPTER.edition} edition
{CHAPTER.title}
{CHAPTER.authors}
{CHAPTER.promise}
Further workflows in this vertical
{CHAPTER.further.map((item) => (
-
{item.coming ? (
<>
{item.id}
{" "}
{item.title}
>
) : (
<>
{item.id}
{" "}
{item.title}
>
)}
))}
Sources
{CHAPTER.sources.map((s) => (
- {s}
))}
Last updated: {CHAPTER.lastUpdated}
>
);
}