Skip to content

Commit

Permalink
examples(solid-start-hn): checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
arbassett committed Jul 31, 2023
1 parent af1a258 commit bb196ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
18 changes: 10 additions & 8 deletions examples/solid-start-hn/src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Routes } from "@solidjs/router";
import { Suspense } from "solid-js/web";
import ErrorBoundary from "solid-start/error-boundary";

import Nav from "./components/nav";
import { FileRoutes } from "#solid-start/router";
import { Body, Head, Html } from "~~/start";
import "./Root.css"
import "./Root.css";

const Root = () => (
<Html lang="en">
Expand All @@ -16,13 +18,13 @@ const Root = () => (
</Head>
<Body>
<Nav />
{/* <ErrorBoundary> */}
<Suspense fallback={<div class="news-list-nav">Loading...</div>}>
<Routes>
<FileRoutes />
</Routes>
</Suspense>
{/* </ErrorBoundary> */}
<ErrorBoundary>
<Suspense fallback={<div class="news-list-nav">Loading...</div>}>
<Routes>
<FileRoutes />
</Routes>
</Suspense>
</ErrorBoundary>
{/* <Scripts /> */}
</Body>
</Html>
Expand Down
3 changes: 2 additions & 1 deletion examples/solid-start-hn/start/modules/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,13 @@ const generateRouteDefinitons = (routes: NoyauRoute[]) => {
return source`
${dataExports.join("\n")}
const fileRoutes = [
export const fileRoutes = [
${routeDefinitions}
]
export const FileRoutes = () => {
return fileRoutes as unknown as JSX.Element;
};
`;
};

0 comments on commit bb196ce

Please sign in to comment.