import React from 'react'; import { useMarkdown } from '../../hooks/useMarkdown.ts'; interface MarkdownWithTocProps { fileUrl: string; } const MarkdownWithToc: React.FC = ({ fileUrl }) => { const { markdownHtml, toc, isLoading, error } = useMarkdown(fileUrl); const renderLayout = () => { if (isLoading) { return (

Loading Document...

); } if (error) { return (

Could not load document

{error}

); } return ( <>
); }; return (
{renderLayout()}
); }; export default MarkdownWithToc;