react-layout-sdk 1.1.2 → 1.1.4

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/bin/init.js +5 -4
  2. package/package.json +1 -1
package/bin/init.js CHANGED
@@ -33,8 +33,8 @@ const factoryContent = `import Header from './Header';
33
33
  import Footer from './Footer';
34
34
 
35
35
  export const componentMap = {
36
- 'velox.header': Header,
37
- 'velox.footer': Footer,
36
+ 'core.header': Header,
37
+ 'core.footer': Footer,
38
38
  };
39
39
  `;
40
40
  if (!fs.existsSync(factoryPath)) {
@@ -105,8 +105,9 @@ if (hasAppRouter) {
105
105
  import { fetchVeloxLayout, Placeholder } from 'react-layout-sdk';
106
106
  import { componentMap } from '@/components/factory';
107
107
 
108
- export default async function Page({ params }: { params: { slug?: string[] } }) {
109
- const slugArray = params.slug || [];
108
+ export default async function Page({ params }: { params: Promise<{ slug?: string[] }> }) {
109
+ const resolvedParams = await params;
110
+ const slugArray = resolvedParams?.slug || [];
110
111
  const path = slugArray.join('/') || '/';
111
112
  const STRAPI_URL = process.env.NEXT_PUBLIC_STRAPI_URL || 'http://localhost:1337';
112
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-layout-sdk",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "React components for Velox SDK (Sitecore-like routing)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",