From fa6b312f06cfbdcc3ed87246ba5d33ba23a05917 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 29 Jan 2023 23:36:37 -0800 Subject: [PATCH] Move storeGridWeapon to after conflict deletion Otherwise, we delete what we just stored --- components/WeaponGrid/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/WeaponGrid/index.tsx b/components/WeaponGrid/index.tsx index c484ac41..0fe9c291 100644 --- a/components/WeaponGrid/index.tsx +++ b/components/WeaponGrid/index.tsx @@ -183,9 +183,6 @@ const WeaponGrid = (props: Props) => { position: position, }) .then((response) => { - // Store new character in state - storeGridWeapon(response.data) - // Remove conflicting characters from state conflicts.forEach((c) => { if (appState.grid.weapons.mainWeapon?.object.id === c.id) { @@ -196,6 +193,9 @@ const WeaponGrid = (props: Props) => { } }) + // Store new character in state + storeGridWeapon(response.data.grid_weapon) + // Reset conflict resetConflict()