Skip to content

Commit

Permalink
Update ButtonWithImage.js
Browse files Browse the repository at this point in the history
chtrembl committed Feb 1, 2024
1 parent 93402a4 commit fd6f44a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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}`;

0 comments on commit fd6f44a

Please sign in to comment.