File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 11open ReactRouter
22open Mdx
33
4- module Sidebar = SidebarLayout .Sidebar
5-
6- module NavItem = Sidebar .NavItem
7- module Category = Sidebar .Category
8-
94type loaderData = {
105 ... Mdx .t ,
116 categories : array <SidebarLayout .Sidebar .Category .t >,
@@ -103,10 +98,17 @@ let default = () => {
10398 ? "ReScript Language Manual"
10499 : "Some other page"
105100
106- <div >
101+ if (
102+ (pathname :> string )-> String .includes ("docs/manual" ) ||
103+ (pathname :> string )-> String .includes ("docs/react" )
104+ ) {
107105 <DocsLayout metaTitleCategory categories activeToc = {title : "Introduction" , entries }>
108106 <div className = "markdown-body" > {component ()} </div >
109107 </DocsLayout >
110- </div >
108+ } else {
109+ // TODO Handle blog pages
110+ React .null
111+ }
112+
111113 // </ManualDocsLayout.V1200Layout>
112114}
Original file line number Diff line number Diff line change 1+ open ReactRouter
2+
3+ type loaderData = {
4+ ... Mdx .t ,
5+ categories : array <SidebarLayout .Sidebar .Category .t >,
6+ entries : array <TableOfContents .entry >,
7+ }
8+
9+ let loader : ReactRouter .Loader .t <loaderData >
10+ let default : unit => Jsx .element
You can’t perform that action at this time.
0 commit comments