react-layout-sdk 1.1.2 → 1.1.3
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.
- package/bin/init.js +3 -2
- package/package.json +1 -1
package/bin/init.js
CHANGED
|
@@ -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
|
|
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
|
|