Skip to content

Commit 100fb4c

Browse files
committed
make sure progress is synced
1 parent 2a54652 commit 100fb4c

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

app/routes/MdxRoute.res

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
open ReactRouter
22
open Mdx
33

4-
module Sidebar = SidebarLayout.Sidebar
5-
6-
module NavItem = Sidebar.NavItem
7-
module Category = Sidebar.Category
8-
94
type 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
}

app/routes/MdxRoute.resi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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

0 commit comments

Comments
 (0)