Skip to content

Commit

Permalink
refactor(confirmation.html): Merge error and confirmation pages
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Oct 31, 2024
1 parent 0f57130 commit ba97b8e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
18 changes: 17 additions & 1 deletion public/confirmation.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<html>
<head>
<title>Request Result</title>
</head>
<body>
<p>Your request is confirmed.</p>
<p id="contents">
Your request is confirmed.
<noscript>If an error occurred, a message is embedded in the URL for this page, but could not be parsed.</noscript>
</p>
</body>
<script>
var search = window.location.search.split("?")[1];
if (search) {
var urlParams = search.split(";");
var errorParam = urlParams.find(p => p.startsWith("error="));
if (errorParam) {
document.getElementById("contents").innerHTML = `An error occurred: ${decodeURIComponent(errorParam.split("=")[1])}`;
}
}
</script>
</html>
19 changes: 0 additions & 19 deletions public/error.html

This file was deleted.

0 comments on commit ba97b8e

Please sign in to comment.