-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: eliminate fetchings logs without logging client
- Loading branch information
1 parent
cfa27e6
commit 0ce9bd2
Showing
9 changed files
with
88 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
document | ||
.getElementById('blockHeightForm') | ||
.addEventListener('submit', async (e) => { | ||
e.preventDefault(); | ||
|
||
const height = document.getElementById('blockHeight').value; | ||
const spinner = document.getElementById('spinnerHeightForm'); | ||
const submitButton = document.getElementById('submitHeightButton'); | ||
const network = document.getElementById('networkSelect').value; | ||
|
||
spinner.style.display = 'inline-block'; | ||
submitButton.style.visibility = 'hidden'; | ||
try { | ||
const response = await fetch('/submit-height', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({ height, network }), | ||
}); | ||
|
||
if (response.ok) { | ||
const svgContent = await response.blob(); | ||
const url = URL.createObjectURL(svgContent); | ||
|
||
const svgElement = document.getElementById('svgDisplay'); | ||
svgElement.src = url; | ||
svgElement.style.display = 'inline-block'; | ||
} else { | ||
console.error('Failed to upload file'); | ||
} | ||
} catch (error) { | ||
console.error('Error:', error); | ||
} finally { | ||
spinner.style.display = 'none'; | ||
submitButton.style.visibility = 'visible'; | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.