@backmatter/next 0.0.9 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/routes.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backmatter/next",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Experimental Next.js adapter for Backmatter. APIs will break. Not ready for production.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -38,7 +38,7 @@
38
38
  "test": "bun test"
39
39
  },
40
40
  "dependencies": {
41
- "@backmatter/core": "^0.0.9",
41
+ "@backmatter/core": "^0.0.10",
42
42
  "@mdx-js/mdx": "^3.1.1",
43
43
  "remark-gfm": "^4.0.1"
44
44
  },
package/src/routes.ts CHANGED
@@ -62,7 +62,7 @@ export type CatchAllRoute = {
62
62
  Page: (props: {
63
63
  params: Promise<CatchAllParams>;
64
64
  searchParams?: Promise<CatchAllSearchParams>;
65
- }) => ReactNode;
65
+ }) => Promise<ReactNode>;
66
66
  CmsRoute: (props: {
67
67
  params: Promise<CatchAllParams> | CatchAllParams;
68
68
  searchParams?: Promise<CatchAllSearchParams> | CatchAllSearchParams;
@@ -273,11 +273,11 @@ export function createCatchAll<Models extends readonly ModelDef[]>(
273
273
  );
274
274
  };
275
275
 
276
- const Page: CatchAllRoute["Page"] = (props) =>
276
+ const Page: CatchAllRoute["Page"] = async (props) =>
277
277
  createElement(
278
278
  Fragment,
279
279
  null,
280
- createElement(PublishedRoute, props),
280
+ await PublishedRoute(props),
281
281
  createElement(Suspense, { fallback: null }, createElement(PreviewBranch, props)),
282
282
  );
283
283