From c66bad776d0b9df655451cdb504a34ffbf0df1a3 Mon Sep 17 00:00:00 2001 From: Amitkanswal Date: Fri, 23 Feb 2024 11:01:23 +0530 Subject: [PATCH 1/2] fix:live edit redirect Signed-off-by: Amitkanswal --- .env.example | 27 +++++---- package-lock.json | 139 +++++++++++++++++++++++----------------------- package.json | 17 +++--- src/sdk/entry.ts | 14 ++++- 4 files changed, 102 insertions(+), 95 deletions(-) diff --git a/.env.example b/.env.example index 92dc51b..26e49f5 100644 --- a/.env.example +++ b/.env.example @@ -1,28 +1,27 @@ -#create environment file name as .env -#and place following configuration data. - +# This is a settings file for our application. +# Contentstack is the tool we use to manage our website's content. +# You need to replace 'your_stack_api_key', 'your_delivery_token', and 'your_environment_name' with the actual information. REACT_APP_CONTENTSTACK_API_KEY=your_stack_api_key REACT_APP_CONTENTSTACK_DELIVERY_TOKEN=your_delivery_token REACT_APP_CONTENTSTACK_ENVIRONMENT=your_environment_name -# Below config options are for enabling live preview/live edit tags for the starter app - +# Live Preview lets us see changes before they are shown on the website. +# Replace 'your_live_preview_token' with the actual information. REACT_APP_CONTENTSTACK_PREVIEW_HOST=rest-preview.contentstack.com REACT_APP_CONTENTSTACK_PREVIEW_TOKEN=your_live_preview_token REACT_APP_CONTENTSTACK_APP_HOST=app.contentstack.com REACT_APP_CONTENTSTACK_LIVE_PREVIEW=true REACT_APP_CONTENTSTACK_LIVE_EDIT_TAGS=false - +# These are extra settings. You can remove the '#' at the start of the line and fill these if needed. # REACT_APP_CONTENTSTACK_API_HOST= api.contentstack.io -# REACT_APP_CONTENTSTACK_REGION=eu +# REACT_APP_CONTENTSTACK_REGION=us # REACT_APP_CONTENTSTACK_BRANCH=main -### NOTE: - # REACT_APP_CONTENTSTACK_API_HOST- For setting custom api host for contentstack sdk - # REACT_APP_CONTENTSTACK_REGION- For setting custom region for contentstack sdk default is us - # REACT_APP_CONTENTSTACK_BRANCH- For setting custom branch for contentstack sdk default is main - - # Setting Live Preview URL's - # REACT_APP_CONTENTSTACK_PREVIEW_HOST- For eu region use eu-rest-preview.contentstack.com/azure-na-rest-preview.contentstack.com/azure-eu-rest-preview.contentstack.com \ No newline at end of file +# Notes: +# - REACT_APP_CONTENTSTACK_API_HOST: This is for setting a custom address for the Contentstack tool. +# - REACT_APP_CONTENTSTACK_REGION: This is for setting a custom region for the Contentstack tool (default is 'us'). +# - REACT_APP_CONTENTSTACK_BRANCH: This is for setting a custom branch for the Contentstack tool (default is 'main'). +# - REACT_APP_CONTENTSTACK_PREVIEW_HOST: If you're in the EU just append "eu-" to "rest-preview.contentstack.com" +# - example eu-rest-preview.contentstack.com \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7e0003c..7a93076 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,32 +1,33 @@ { "name": "contentstack-react-starter-app", - "version": "2.0.5", + "version": "2.0.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "contentstack-react-starter-app", - "version": "2.0.5", + "version": "2.0.6", "license": "MIT", "dependencies": { "@contentstack/live-preview-utils": "^1.4.0", - "@contentstack/utils": "^1.3.1", - "@textea/json-viewer": "^3.3.0", - "@types/react": "^18.2.48", + "@contentstack/utils": "^1.3.2", + "@textea/json-viewer": "^3.4.0", + "@types/react": "^18.2.57", + "caniuse-lite": "^1.0.30001589", "contentstack": "^3.19.0", "html-react-parser": "^3.0.16", "moment": "^2.30.1", "nth-check": "^2.1.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-loading-skeleton": "^3.3.1", - "react-router-dom": "^6.21.2", + "react-loading-skeleton": "^3.4.0", + "react-router-dom": "^6.22.1", "react-script": "^2.0.5", "typescript": "^4.9.5", "web-vitals": "^2.1.4" }, "devDependencies": { - "@types/react-dom": "^18.2.18", + "@types/react-dom": "^18.2.19", "eslint": "^8.56.0", "eslint-plugin-react": "^7.33.2", "react-scripts": "^5.0.1" @@ -2165,9 +2166,9 @@ } }, "node_modules/@contentstack/utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.3.1.tgz", - "integrity": "sha512-qvhEYAxPzUAC++pA2y6W9uMHAsyeFhRLd/bw/Mw2TblBkOxf62W1ASuRdJZz2bfSYp8aAX4HBC22DvzYvkLgHg==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.3.2.tgz", + "integrity": "sha512-B1IftYzzC6YzwDusf3U9YA2Ul740IchqIWmA367Q6sILMI36y/V02f9K5UBS3VAiqbVVmo50ZaFrEulZg15Srg==" }, "node_modules/@csstools/normalize.css": { "version": "12.0.0", @@ -3483,9 +3484,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.14.2.tgz", - "integrity": "sha512-ACXpdMM9hmKZww21yEqWwiLws/UPLhNKvimN8RrYSqPSvB3ov7sLvAcfvaxePeLvccTQKGdkDIhLYApZVDFuKg==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.1.tgz", + "integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w==", "engines": { "node": ">=14.0.0" } @@ -3850,9 +3851,9 @@ } }, "node_modules/@textea/json-viewer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@textea/json-viewer/-/json-viewer-3.3.0.tgz", - "integrity": "sha512-E4P8THAmKcirCErXbX4np62mSANTE31Euh8jbchcLmpoYiOp+15iUlgKssz2AmGfSk4IxyiBjJEuLIdpn+aExQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@textea/json-viewer/-/json-viewer-3.4.0.tgz", + "integrity": "sha512-DrlebIvZhugE7sDGeV/00jsxnxQfSegOd29ZAVsdcepvdcHtl6m+cHjDmuFIX0CqJIXkXvDZF6P5ytPGx8H3ng==", "dependencies": { "clsx": "^2.0.0", "copy-to-clipboard": "^3.3.3", @@ -4127,9 +4128,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.48", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz", - "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==", + "version": "18.2.57", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.57.tgz", + "integrity": "sha512-ZvQsktJgSYrQiMirAN60y4O/LRevIV8hUzSOSNB6gfR3/o3wCBFQx3sPwIYtuDMeiVgsSS3UzCV26tEzgnfvQw==", "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -4137,9 +4138,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.18", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", - "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "dev": true, "dependencies": { "@types/react": "*" @@ -5746,10 +5747,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001516", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz", - "integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==", - "dev": true, + "version": "1.0.30001589", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz", + "integrity": "sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==", "funding": [ { "type": "opencollective", @@ -14220,9 +14220,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-loading-skeleton": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/react-loading-skeleton/-/react-loading-skeleton-3.3.1.tgz", - "integrity": "sha512-NilqqwMh2v9omN7LteiDloEVpFyMIa0VGqF+ukqp0ncVlYu1sKYbYGX9JEl+GtOT9TKsh04zCHAbavnQ2USldA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/react-loading-skeleton/-/react-loading-skeleton-3.4.0.tgz", + "integrity": "sha512-1oJEBc9+wn7BbkQQk7YodlYEIjgeR+GrRjD+QXkVjwZN7LGIcAFHrx4NhT7UHGBxNY1+zax3c+Fo6XQM4R7CgA==", "peerDependencies": { "react": ">=16.8.0" } @@ -14242,11 +14242,11 @@ } }, "node_modules/react-router": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.21.2.tgz", - "integrity": "sha512-jJcgiwDsnaHIeC+IN7atO0XiSRCrOsQAHHbChtJxmgqG2IaYQXSnhqGb5vk2CU/wBQA12Zt+TkbuJjIn65gzbA==", + "version": "6.22.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.1.tgz", + "integrity": "sha512-0pdoRGwLtemnJqn1K0XHUbnKiX0S4X8CgvVVmHGOWmofESj31msHo/1YiqcJWK7Wxfq2a4uvvtS01KAQyWK/CQ==", "dependencies": { - "@remix-run/router": "1.14.2" + "@remix-run/router": "1.15.1" }, "engines": { "node": ">=14.0.0" @@ -14256,12 +14256,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.21.2.tgz", - "integrity": "sha512-tE13UukgUOh2/sqYr6jPzZTzmzc70aGRP4pAjG2if0IP3aUT+sBtAKUJh0qMh0zylJHGLmzS+XWVaON4UklHeg==", + "version": "6.22.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.1.tgz", + "integrity": "sha512-iwMyyyrbL7zkKY7MRjOVRy+TMnS/OPusaFVxM2P11x9dzSzGmLsebkCvYirGq0DWB9K9hOspHYYtDz33gE5Duw==", "dependencies": { - "@remix-run/router": "1.14.2", - "react-router": "6.21.2" + "@remix-run/router": "1.15.1", + "react-router": "6.22.1" }, "engines": { "node": ">=14.0.0" @@ -19038,9 +19038,9 @@ } }, "@contentstack/utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.3.1.tgz", - "integrity": "sha512-qvhEYAxPzUAC++pA2y6W9uMHAsyeFhRLd/bw/Mw2TblBkOxf62W1ASuRdJZz2bfSYp8aAX4HBC22DvzYvkLgHg==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.3.2.tgz", + "integrity": "sha512-B1IftYzzC6YzwDusf3U9YA2Ul740IchqIWmA367Q6sILMI36y/V02f9K5UBS3VAiqbVVmo50ZaFrEulZg15Srg==" }, "@csstools/normalize.css": { "version": "12.0.0", @@ -19937,9 +19937,9 @@ "peer": true }, "@remix-run/router": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.14.2.tgz", - "integrity": "sha512-ACXpdMM9hmKZww21yEqWwiLws/UPLhNKvimN8RrYSqPSvB3ov7sLvAcfvaxePeLvccTQKGdkDIhLYApZVDFuKg==" + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.1.tgz", + "integrity": "sha512-zcU0gM3z+3iqj8UX45AmWY810l3oUmXM7uH4dt5xtzvMhRtYVhKGOmgOd1877dOPPepfCjUv57w+syamWIYe7w==" }, "@rollup/plugin-babel": { "version": "5.3.1", @@ -20173,9 +20173,9 @@ } }, "@textea/json-viewer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@textea/json-viewer/-/json-viewer-3.3.0.tgz", - "integrity": "sha512-E4P8THAmKcirCErXbX4np62mSANTE31Euh8jbchcLmpoYiOp+15iUlgKssz2AmGfSk4IxyiBjJEuLIdpn+aExQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@textea/json-viewer/-/json-viewer-3.4.0.tgz", + "integrity": "sha512-DrlebIvZhugE7sDGeV/00jsxnxQfSegOd29ZAVsdcepvdcHtl6m+cHjDmuFIX0CqJIXkXvDZF6P5ytPGx8H3ng==", "requires": { "clsx": "^2.0.0", "copy-to-clipboard": "^3.3.3", @@ -20436,9 +20436,9 @@ "dev": true }, "@types/react": { - "version": "18.2.48", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz", - "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==", + "version": "18.2.57", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.57.tgz", + "integrity": "sha512-ZvQsktJgSYrQiMirAN60y4O/LRevIV8hUzSOSNB6gfR3/o3wCBFQx3sPwIYtuDMeiVgsSS3UzCV26tEzgnfvQw==", "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -20446,9 +20446,9 @@ } }, "@types/react-dom": { - "version": "18.2.18", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", - "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", + "version": "18.2.19", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.19.tgz", + "integrity": "sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==", "dev": true, "requires": { "@types/react": "*" @@ -21686,10 +21686,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001516", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz", - "integrity": "sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g==", - "dev": true + "version": "1.0.30001589", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz", + "integrity": "sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==" }, "case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -27867,9 +27866,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "react-loading-skeleton": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/react-loading-skeleton/-/react-loading-skeleton-3.3.1.tgz", - "integrity": "sha512-NilqqwMh2v9omN7LteiDloEVpFyMIa0VGqF+ukqp0ncVlYu1sKYbYGX9JEl+GtOT9TKsh04zCHAbavnQ2USldA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/react-loading-skeleton/-/react-loading-skeleton-3.4.0.tgz", + "integrity": "sha512-1oJEBc9+wn7BbkQQk7YodlYEIjgeR+GrRjD+QXkVjwZN7LGIcAFHrx4NhT7UHGBxNY1+zax3c+Fo6XQM4R7CgA==", "requires": {} }, "react-property": { @@ -27884,20 +27883,20 @@ "dev": true }, "react-router": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.21.2.tgz", - "integrity": "sha512-jJcgiwDsnaHIeC+IN7atO0XiSRCrOsQAHHbChtJxmgqG2IaYQXSnhqGb5vk2CU/wBQA12Zt+TkbuJjIn65gzbA==", + "version": "6.22.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.1.tgz", + "integrity": "sha512-0pdoRGwLtemnJqn1K0XHUbnKiX0S4X8CgvVVmHGOWmofESj31msHo/1YiqcJWK7Wxfq2a4uvvtS01KAQyWK/CQ==", "requires": { - "@remix-run/router": "1.14.2" + "@remix-run/router": "1.15.1" } }, "react-router-dom": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.21.2.tgz", - "integrity": "sha512-tE13UukgUOh2/sqYr6jPzZTzmzc70aGRP4pAjG2if0IP3aUT+sBtAKUJh0qMh0zylJHGLmzS+XWVaON4UklHeg==", + "version": "6.22.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.1.tgz", + "integrity": "sha512-iwMyyyrbL7zkKY7MRjOVRy+TMnS/OPusaFVxM2P11x9dzSzGmLsebkCvYirGq0DWB9K9hOspHYYtDz33gE5Duw==", "requires": { - "@remix-run/router": "1.14.2", - "react-router": "6.21.2" + "@remix-run/router": "1.15.1", + "react-router": "6.22.1" } }, "react-script": { diff --git a/package.json b/package.json index 92e4b31..9d0e953 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,23 @@ { "name": "contentstack-react-starter-app", "description": "A starter app for Contentstack and React", - "version": "2.0.5", + "version": "2.0.6", "private": true, "author": "Contentstack", "dependencies": { "@contentstack/live-preview-utils": "^1.4.0", - "@contentstack/utils": "^1.3.1", - "@textea/json-viewer": "^3.3.0", - "@types/react": "^18.2.48", + "@contentstack/utils": "^1.3.2", + "@textea/json-viewer": "^3.4.0", + "@types/react": "^18.2.57", + "caniuse-lite": "^1.0.30001589", "contentstack": "^3.19.0", "html-react-parser": "^3.0.16", "moment": "^2.30.1", "nth-check": "^2.1.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-loading-skeleton": "^3.3.1", - "react-router-dom": "^6.21.2", + "react-loading-skeleton": "^3.4.0", + "react-router-dom": "^6.22.1", "react-script": "^2.0.5", "typescript": "^4.9.5", "web-vitals": "^2.1.4" @@ -53,9 +54,9 @@ }, "license": "MIT", "devDependencies": { - "@types/react-dom": "^18.2.18", + "@types/react-dom": "^18.2.19", "eslint": "^8.56.0", "eslint-plugin-react": "^7.33.2", "react-scripts": "^5.0.1" } -} +} \ No newline at end of file diff --git a/src/sdk/entry.ts b/src/sdk/entry.ts index 8f21a7c..5f16680 100644 --- a/src/sdk/entry.ts +++ b/src/sdk/entry.ts @@ -21,6 +21,8 @@ type GetEntryByUrl = { const { REACT_APP_CONTENTSTACK_API_HOST, + REACT_APP_CONTENTSTACK_API_KEY, + REACT_APP_CONTENTSTACK_APP_HOST, } = process.env; const customHostBaseUrl = REACT_APP_CONTENTSTACK_API_HOST? customHostUrl( @@ -37,9 +39,15 @@ if (customHostBaseUrl && isValidCustomHostUrl(customHostBaseUrl)) { // Setting LP if enabled ContentstackLivePreview.init({ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -//@ts-ignore -stackSdk:Stack, + stackSdk: { + ...Stack, + headers: { + api_key: REACT_APP_CONTENTSTACK_API_KEY as string, + }, + }, + clientUrlParams:{ + host: REACT_APP_CONTENTSTACK_APP_HOST + } })?.catch((error) => console.error(error)); From de147b7ff471d6932d61d570d256eaaae08e8630 Mon Sep 17 00:00:00 2001 From: Amitkanswal Date: Fri, 23 Feb 2024 11:58:00 +0530 Subject: [PATCH 2/2] fix: live preview fix Signed-off-by: Amitkanswal --- src/sdk/entry.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/sdk/entry.ts b/src/sdk/entry.ts index 5f16680..8038368 100644 --- a/src/sdk/entry.ts +++ b/src/sdk/entry.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ import * as Utils from "@contentstack/utils"; import ContentstackLivePreview from "@contentstack/live-preview-utils"; import { @@ -39,12 +40,8 @@ if (customHostBaseUrl && isValidCustomHostUrl(customHostBaseUrl)) { // Setting LP if enabled ContentstackLivePreview.init({ - stackSdk: { - ...Stack, - headers: { - api_key: REACT_APP_CONTENTSTACK_API_KEY as string, - }, - }, + //@ts-ignore + stackSdk: Stack, clientUrlParams:{ host: REACT_APP_CONTENTSTACK_APP_HOST }