Skip to content

Commit a922ad7

Browse files
committed
added in docs
1 parent ca55a53 commit a922ad7

File tree

590 files changed

+5264
-129443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

590 files changed

+5264
-129443
lines changed

app/root.jsx

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isRouteErrorResponse, Outlet, Scripts, useNavigate } from "react-router";
1+
import { Outlet, Scripts } from "react-router";
22
import { make as Navigation } from "../src/components/Navigation.mjs";
33
import "../styles/_hljs.css";
44
import "../styles/main.css";
@@ -42,31 +42,4 @@ export default function App() {
4242
</body>
4343
</html>
4444
);
45-
}
46-
47-
export function ErrorBoundary({
48-
error,
49-
}) {
50-
const navigate = useNavigate()
51-
if (isRouteErrorResponse(error)) {
52-
return (
53-
<>
54-
<h1>
55-
{error.status} {error.statusText}
56-
</h1>
57-
<p>{error.data}</p>
58-
</>
59-
);
60-
} else if (error instanceof Error) {
61-
return (
62-
<div>
63-
<h1>Error</h1>
64-
<p>{error.message}</p>
65-
<p>The stack trace is:</p>
66-
<pre>{error.stack}</pre>
67-
</div>
68-
);
69-
} else {
70-
return <h1>Unknown Error</h1>;
71-
}
7245
}

app/routes.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { index } from "@react-router/dev/routes";
1+
import { index, route } from "@react-router/dev/routes";
22
import { routes } from 'react-router-mdx/server';
33

44
export default [
55
index("./routes/LandingPageRoute.jsx"),
6+
route("syntax-lookup", "./routes/SyntaxLookupRoute.jsx"),
67
...routes("./routes/mdx.jsx"),
8+
// TODO: playground, blog, community,
79
]

app/routes/SyntaxLookupRoute.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default function SyntaxLookup(props) {
2+
// TODO: add syntax lookup
3+
return <div>Syntax</div>
4+
}

app/routes/mdx.jsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import { useMdxAttributes, useMdxComponent } from 'react-router-mdx/client'
22
import { loadMdx } from 'react-router-mdx/server'
33

4-
export async function loader({ request, ...rest }) {
5-
const res = loadMdx(request)
6-
console.log(await res)
7-
console.log(rest)
8-
return res
4+
export async function loader({ request }) {
5+
return loadMdx(request)
96
}
107

118
export default function Route() {
File renamed without changes.

0 commit comments

Comments
 (0)