fix(Map): add key for cache changes detecting

Fixes #6
This commit is contained in:
achichenkov
2024-09-21 11:26:25 +03:00
parent bee64c2570
commit c7866a1270
2 changed files with 7 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ export const RoutesWidgetContent = () => {
const { loading } = useLoadRoutes();
const { systems: systemStatics, loadSystems } = useLoadSystemStatic({ systems: hubs ?? [] });
const { systems: systemStatics, loadSystems, lastUpdateKey } = useLoadSystemStatic({ systems: hubs ?? [] });
const { open, ...systemCtxProps } = useContextMenuSystemInfoHandlers({
outCommand,
hubs,
@@ -51,7 +51,8 @@ export const RoutesWidgetContent = () => {
return { ...systemStatics.get(parseInt(x))!, ...(sys && { customName: sys.name ?? '' }) };
});
}, [hubs, systems, systemStatics]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [hubs, systems, systemStatics, lastUpdateKey]);
const preparedRoutes = useMemo(() => {
return (