From fd6f44a863dc66a26e20f4b57af7adb07c846be7 Mon Sep 17 00:00:00 2001 From: Chris Tremblay Date: Wed, 31 Jan 2024 22:04:39 -0500 Subject: [PATCH] Update ButtonWithImage.js --- .../src/components/ContentCards/ButtonWithImage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCards/ButtonWithImage.js b/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCards/ButtonWithImage.js index ea982241..0bf50dc2 100644 --- a/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCards/ButtonWithImage.js +++ b/petstore/petstoreapp/soulmachines-react-app/src/components/ContentCards/ButtonWithImage.js @@ -9,8 +9,8 @@ function ButtonWithImage({ data, className }) { const handleButtonClick = (e) => { e.preventDefault(); - const url = `${window.parent.location}`; - console.log(`${url} ${productId}`); + const url = window.parent.location.toString(); + console.log(`${url} ${productId}`); const session = url.split('sid=')[1].split('&')[0]; const csrf = url.split('csrf=')[1]; const azureURL = `https://azurepetstore.com/api/updatecart?csrf=${csrf}&productId=${productId}`;