import Section from "./Section"; import { useState, useEffect } from "react"; import { TableOfContents } from "./TableOfContents"; export default function ContentArea(props) { const [shortcut, setShortcut] = useState(""); const detectOS = () => { const agent = window.navigator.appVersion; if (agent.includes("Win")) { return "Ctrl+K"; } else if (agent.includes("Mac")) { return "⌘K"; } else if (agent.includes("Linux")) { return "Ctrl+K"; } }; useEffect(() => { setShortcut(detectOS()); }, []); return (
{props.breadcrumbs}
{props.narrow ? (

{props.title}

{props.children}
) : (

{props.title}

{props.children}
)}
); }