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 1
1
open ReactRouter
2
2
open Mdx
3
3
4
- module Sidebar = SidebarLayout .Sidebar
5
-
6
- module NavItem = Sidebar .NavItem
7
- module Category = Sidebar .Category
8
-
9
4
type loaderData = {
10
5
... Mdx .t ,
11
6
categories : array <SidebarLayout .Sidebar .Category .t >,
@@ -103,10 +98,17 @@ let default = () => {
103
98
? "ReScript Language Manual"
104
99
: "Some other page"
105
100
106
- <div >
101
+ if (
102
+ (pathname :> string )-> String .includes ("docs/manual" ) ||
103
+ (pathname :> string )-> String .includes ("docs/react" )
104
+ ) {
107
105
<DocsLayout metaTitleCategory categories activeToc = {title : "Introduction" , entries }>
108
106
<div className = "markdown-body" > {component ()} </div >
109
107
</DocsLayout >
110
- </div >
108
+ } else {
109
+ // TODO Handle blog pages
110
+ React .null
111
+ }
112
+
111
113
// </ManualDocsLayout.V1200Layout>
112
114
}
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