fix(Map): Fixed remove pings for removed systems

This commit is contained in:
Dmitry Popov
2025-07-18 13:39:36 +02:00
parent e457d94df8
commit 0f6847b16d
10 changed files with 41 additions and 38 deletions

View File

@@ -14,8 +14,8 @@ export const useCommandPings = () => {
ref.current.update({ pings });
}, []);
const pingCancelled = useCallback(({ type, solar_system_id }: CommandPingCancelled) => {
const newPings = ref.current.pings.filter(x => x.solar_system_id !== solar_system_id && x.type !== type);
const pingCancelled = useCallback(({ type, id }: CommandPingCancelled) => {
const newPings = ref.current.pings.filter(x => x.id !== id && x.type !== type);
ref.current.update({ pings: newPings });
}, []);