diff --git a/build/index.html b/build/index.html index 893fb85..a853afe 100644 --- a/build/index.html +++ b/build/index.html @@ -1,2 +1,2 @@ -React App
\ No newline at end of file +React App
\ No newline at end of file diff --git a/package.json b/package.json index b1d557a..5f91eeb 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "dependencies": { "@adobe/aem-headless-client-js": "^3.1.0", "@adobe/aem-headless-client-nodejs": "^1.1.0", - "@adobe/universal-editor-cors": "^2.2.16", + "@adobe/universal-editor-cors": "2.3.3", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^13.5.0", diff --git a/src/components/AdventureDetail.jsx b/src/components/AdventureDetail.jsx index 0cacd33..3d2e62f 100644 --- a/src/components/AdventureDetail.jsx +++ b/src/components/AdventureDetail.jsx @@ -137,10 +137,9 @@ function NoAdventureFound() { function getAdventure(data) { if (data && data.adventureList && data.adventureList.items) { - // expect there only to be a single adventure in the array - if (data.adventureList.items.length === 1) { - return data.adventureList.items[0]; - } + return data.adventureList.items.find(item => { + return item._path.startsWith("/content/dam/wknd-shared/en"); + }); } return undefined; } diff --git a/yarn.lock b/yarn.lock index a10c58d..a5c5973 100644 --- a/yarn.lock +++ b/yarn.lock @@ -84,10 +84,10 @@ resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.2.0.tgz#e1a84fca468f4b337816fcb7f0964beb620ba855" integrity sha512-E09FiIft46CmH5Qnjb0wsW54/YQd69LsxeKUOWawmws1XWvyFGURnAChH0mlr7YPFR1ofwvUQfcL0J3lMxXqPA== -"@adobe/universal-editor-cors@^2.2.16": - version "2.2.16" - resolved "https://registry.yarnpkg.com/@adobe/universal-editor-cors/-/universal-editor-cors-2.2.16.tgz#16475695eaeff5ac6b13da72ebfd3ed48a81d4d2" - integrity sha512-n78JSjJmO2quqwShKllOjgv7GwFhkd74PxxjHGkLv4cNRV+3uvYGjVySsKvd6973pEPJUS2BTzIWPnzIre7uyw== +"@adobe/universal-editor-cors@2.3.3": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@adobe/universal-editor-cors/-/universal-editor-cors-2.3.3.tgz#be9bfb4883d4ae16307b69d69cd258a0ff0d9d4f" + integrity sha512-3jg5p+YE5KmWRbcvf5ugZOtEovITdHpQ/v4qM3UwzxOHBDqoTy1GCnG8Gc9/qJTfxBdZhmtZPDigedFn6PCScQ== "@ampproject/remapping@^2.2.0": version "2.2.1"