Compare commits

..

3 Commits

Author SHA1 Message Date
CI
5ba21f5386 chore: release version v1.19.1
Some checks are pending
Build / 🚀 Deploy to test env (fly.io) (push) Waiting to run
Build / 🛠 Build (1.17, 18.x, 27) (push) Waiting to run
Build / 🛠 Build Docker Images (linux/amd64) (push) Blocked by required conditions
Build / 🏷 Create Release (push) Blocked by required conditions
2024-11-19 16:07:12 +00:00
Dmitry Popov
10eeae5295 Merge branch 'main' of github.com:wanderer-industries/wanderer 2024-11-19 17:06:39 +01:00
Dmitry Popov
a5bead15d0 chore: release version v1.18.1 2024-11-19 17:06:35 +01:00
5 changed files with 19 additions and 6 deletions

View File

@@ -2,6 +2,11 @@
<!-- changelog -->
## [v1.19.1](https://github.com/wanderer-industries/wanderer/compare/v1.19.0...v1.19.1) (2024-11-19)
## [v1.19.0](https://github.com/wanderer-industries/wanderer/compare/v1.18.1...v1.19.0) (2024-11-19)

View File

@@ -1,6 +1,7 @@
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
import { useCallback, useRef } from 'react';
import { CommandAddSystems, CommandRemoveSystems, CommandUpdateSystems } from '@/hooks/Mapper/types';
import { useLoadSystemStatic } from '@/hooks/Mapper/mapRootProvider/hooks/useLoadSystemStatic.ts';
export const useCommandsSystems = () => {
const {
@@ -8,16 +9,22 @@ export const useCommandsSystems = () => {
data: { systems },
} = useMapRootState();
const { addSystemStatic } = useLoadSystemStatic({ systems: [] });
const ref = useRef({ systems, update });
ref.current = { systems, update };
const addSystems = useCallback(
(addSystems: CommandAddSystems) => {
addSystems.forEach(sys => {
addSystemStatic(sys.system_static_info);
});
update({
systems: [...ref.current.systems.filter(sys => addSystems.some(x => sys.id !== x.id)), ...addSystems],
systems: [...ref.current.systems.filter(sys => !addSystems.some(x => sys.id === x.id)), ...addSystems],
});
},
[update],
[addSystemStatic, update],
);
const removeSystems = useCallback((toRemove: CommandRemoveSystems) => {

View File

@@ -24,7 +24,7 @@ interface UseLoadSystemStaticProps {
systems: (number | string)[];
}
export const useLoadSystemStatic = ({ systems }: UseLoadSystemStaticProps) => {
export const useLoadSystemStatic = ({ systems = [] }: UseLoadSystemStaticProps) => {
const { outCommand } = useMapRootState();
const [loading, setLoading] = useState(false);
const [lastUpdateKey, setLastUpdateKey] = useState(0);
@@ -51,6 +51,9 @@ export const useLoadSystemStatic = ({ systems }: UseLoadSystemStaticProps) => {
}, []);
useEffect(() => {
if (!systems.length) {
return;
}
loadSystems(systems);
// eslint-disable-next-line
}, [systems]);

View File

@@ -144,8 +144,6 @@ defmodule WandererAppWeb.MapSignaturesEventHandler do
updated = updated_signatures |> Enum.find(fn u -> u.eve_id == s.eve_id end)
if not is_nil(updated) do
IO.puts("Updating #{s.eve_id}")
s
|> WandererApp.Api.MapSystemSignature.update(
updated

View File

@@ -2,7 +2,7 @@ defmodule WandererApp.MixProject do
use Mix.Project
@source_url "https://github.com/wanderer-industries/wanderer"
@version "1.19.0"
@version "1.19.1"
def project do
[