import React, { Suspense } from "react"; import { useNavigate } from "react-router-dom"; import useSWR, { mutate } from "swr"; import { WRITER_MODE, PLACEMENT_ENABLED } from "../env"; import { useIsServer, useLocale } from "../hooks"; import { useDocumentURL, useDecorateCodeExamples, useRunSample } from "./hooks"; import { Doc } from "../../../libs/types/document"; // Ingredients import { Prose } from "./ingredients/prose"; import { SpecificationSection } from "./ingredients/spec-section"; // Misc // Sub-components import { TopNavigation } from "../ui/organisms/top-navigation"; import { ArticleActionsContainer } from "../ui/organisms/article-actions-container"; import { LocalizedContentNote } from "./molecules/localized-content-note"; import { OfflineStatusBar } from "../ui/molecules/offline-status-bar"; import { TOC } from "./organisms/toc"; import { RenderSideBar } from "./organisms/sidebar"; import { MainContentContainer } from "../ui/atoms/page-content"; import { Loading } from "../ui/atoms/loading"; import { ArticleFooter } from "./organisms/article-footer"; import { PageNotFound } from "../page-not-found"; import "./index.scss"; // It's unfortunate but it is what it is at the moment. Not every page has an // interactive example (in its HTML blob) but we don't know that in advance. // But just in case it does, we need to have the CSS ready in the main bundle. // Perhaps a more ideal solution would be that the interactive example