feat(*): Enable filtering to either do a forms dex or a regular dex

This commit is contained in:
Josh Creek
2024-07-14 17:47:16 +01:00
parent 7467a4425f
commit 0edc7f0974
6 changed files with 5111 additions and 5086 deletions
+6 -2
View File
@@ -30,14 +30,17 @@
showOrigins = !showOrigins;
}
function toggleForms() {
async function toggleForms() {
showForms = !showForms;
await getData();
}
async function getData() {
combinedData = null;
const response = await fetch(`/api/combined-data?page=${currentPage}&limit=${itemsPerPage}`);
const response = await fetch(
`/api/combined-data?page=${currentPage}&limit=${itemsPerPage}&enableForms=${showForms}`
);
const data = await response.json();
if (data.error) {
@@ -156,6 +159,7 @@
</ul> -->
<div class="mb-4">
<button class="btn btn-sm" on:click={() => toggleForms()}>Toggle Forms</button>
{showForms ? 'On' : 'Off'}
<button class="btn btn-sm" on:click={() => toggleOrigins()}>Toggle Origins</button>
</div>