Skip to content

Commit

Permalink
- Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Koala3353 committed Apr 27, 2024
1 parent d19070e commit 369a64b
Show file tree
Hide file tree
Showing 5 changed files with 479 additions and 14 deletions.
22 changes: 10 additions & 12 deletions activitylist.html
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,9 @@ <h2 class="card__title">Ukulele</h2>
"
>
<a
download=""
href="./assets/pdfs/test-tutorial1.pdf"
class="btn btn-md btn-primary music-download-restrict"
>Download App</a
href="./downloadapp.html"
class="btn-music-download btn btn-md btn-primary music-download-restrict"
>Open App</a
>
</div>
</div>
Expand Down Expand Up @@ -386,10 +385,9 @@ <h2 class="card__title">Guitar</h2>
"
>
<a
download=""
href="./assets/pdfs/test-tutorial1.pdf"
class="btn btn-md btn-primary music-download-restrict"
>Download App</a
href="./downloadapp.html"
class="btn-music-download btn btn-md btn-primary music-download-restrict"
>Open App</a
>
</div>
</div>
Expand Down Expand Up @@ -424,10 +422,9 @@ <h2 class="card__title">Piano</h2>
"
>
<a
download=""
href="./assets/pdfs/test-tutorial1.pdf"
class="btn btn-md btn-primary music-download-restrict disabled"
>Download App</a
href="./downloadapp.html"
class="disabled btn-music-download btn btn-md btn-primary music-download-restrict"
>Open App</a
>
</div>
</div>
Expand Down Expand Up @@ -895,5 +892,6 @@ <h3 class="fs-6 text-white" style="font-family: 'Coolvetica Rg'">
console.log(e);
}
</script>

</body>
</html>
Binary file added assets/img/sparklogoclear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion assets/js/shopping-creds.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ stocks.forEach(stock => {

}

if (!credits) {
alert("You do not have enough credits to purchase this item");
$(".loading").hide();
return;
}

let randomCode = randomCodes[Math.floor(Math.random() * randomCodes.length)];
var reflowAuth = localStorage.getItem("reflowAuth");
var parsedReflowAuth = JSON.parse(reflowAuth);
Expand All @@ -166,18 +172,21 @@ stocks.forEach(stock => {
.then(data => {
console.log('Success:', data, stock.price);
window.location.href = `./success.html?code=${randomCode}&name=${stock.ticker}`;

})
.catch((error) => {
console.error('Error:', error);
alert("An error occured: " + error);
$(".loading").hide();
return;

Check warning on line 180 in assets/js/shopping-creds.js

View workflow job for this annotation

GitHub Actions / qodana

Unnecessary 'return' statement

`return` is unnecessary as the last statement in a function with no return value
});
})
.catch(error => {
console.error('Error:', error);
$(".loading").hide();
return;

Check warning on line 186 in assets/js/shopping-creds.js

View workflow job for this annotation

GitHub Actions / qodana

Unnecessary 'return' statement

`return` is unnecessary as the last statement in a function with no return value
});


});
}
});
Loading

0 comments on commit 369a64b

Please sign in to comment.