Skip to content

Commit 6168f74

Browse files
authored
fix: button (#307)
1 parent 16aab16 commit 6168f74

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

infrastructure/control-panel/src/routes/+page.svelte

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,4 @@
247247
/>
248248
{/if}
249249
</TableCard>
250-
251-
<!-- Start Monitoring Button -->
252-
<div class="mt-8 flex justify-center">
253-
<button
254-
onclick={goToMonitoring}
255-
disabled={selectedEVaults.length === 0 && selectedPlatforms.length === 0}
256-
class="bg-primary hover:bg-primary-600 rounded-full px-8 py-3 text-lg font-semibold text-white transition-colors disabled:cursor-not-allowed disabled:opacity-50"
257-
>
258-
Start Monitoring
259-
</button>
260-
</div>
261250
</section>

infrastructure/control-panel/src/routes/monitoring/+page.svelte

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@
4242
selectedPlatforms = JSON.parse(platformsData);
4343
}
4444
45+
// Check if any items are selected, if not redirect back to home
46+
if (
47+
(!selectedEVaults || selectedEVaults.length === 0) &&
48+
(!selectedPlatforms || selectedPlatforms.length === 0)
49+
) {
50+
goto('/');
51+
return;
52+
}
53+
4554
// Create nodes from selected items
4655
const newNodes: Node[] = [];
4756
let nodeId = 1;

0 commit comments

Comments
 (0)