Use filtered subscriptions to save data

This commit is contained in:
Danielv123 committed 2025-08-10 00:28:48 +02:00
1 parent ea144863f9
commit 38d5fdfdba
4 files changed
+67 -16

No files matched your search

+7
View File
@@ -37,6 +37,13 @@ export default function MinimapPage() {
loadSurfaceForceData();
}, []);
// Keep subscription filters in sync with selection even on the legacy page
useEffect(() => {
const plugin = control.plugins.get("minimap") as import("./index").WebPlugin;
if (!plugin) { return; }
plugin.setInstanceSurfaceFilter(selectedInstance, selectedSurface || null);
}, [control, selectedInstance, selectedSurface]);
const loadSurfaceForceData = async () => {
const response = await fetch(`${window.location.origin}/api/minimap/surfaces`);
const data = await response.json();