diff --git a/components/CharacterGrid/index.tsx b/components/CharacterGrid/index.tsx index 9660cfe6..f8de6218 100644 --- a/components/CharacterGrid/index.tsx +++ b/components/CharacterGrid/index.tsx @@ -104,7 +104,7 @@ const CharacterGrid = (props: Props) => { if (props.pushHistory) props.pushHistory(`/p/${party.shortcode}`) saveCharacter(party.id, character, position) - .then((response) => storeGridCharacter(response.data.grid_character)) + .then((response) => storeGridCharacter(response.data)) .catch((error) => console.error(error)) }) } else { @@ -122,7 +122,7 @@ const CharacterGrid = (props: Props) => { setPosition(data.position) setModalOpen(true) } else { - storeGridCharacter(data.grid_character) + storeGridCharacter(data) } } @@ -159,7 +159,7 @@ const CharacterGrid = (props: Props) => { }) .then((response) => { // Store new character in state - storeGridCharacter(response.data.grid_character) + storeGridCharacter(response.data) // Remove conflicting characters from state conflicts.forEach( @@ -192,7 +192,7 @@ const CharacterGrid = (props: Props) => { if (party.id && appState.party.editable) { api.updateJob({ partyId: party.id, params: payload }).then((response) => { - const newParty = response.data.party + const newParty = response.data setJob(newParty.job) appState.party.job = newParty.job @@ -269,7 +269,7 @@ const CharacterGrid = (props: Props) => { try { if (uncapLevel != previousUncapValues[position]) await api.updateUncap('character', id, uncapLevel).then((response) => { - storeGridCharacter(response.data.grid_character) + storeGridCharacter(response.data) }) } catch (error) { console.error(error) diff --git a/components/SummonGrid/index.tsx b/components/SummonGrid/index.tsx index ff6edf61..1720c032 100644 --- a/components/SummonGrid/index.tsx +++ b/components/SummonGrid/index.tsx @@ -96,13 +96,13 @@ const SummonGrid = (props: Props) => { if (props.pushHistory) props.pushHistory(`/p/${party.shortcode}`) saveSummon(party.id, summon, position).then((response) => - storeGridSummon(response.data.grid_summon) + storeGridSummon(response.data) ) }) } else { if (party.editable) saveSummon(party.id, summon, position).then((response) => - storeGridSummon(response.data.grid_summon) + storeGridSummon(response.data) ) } } diff --git a/components/WeaponGrid/index.tsx b/components/WeaponGrid/index.tsx index ab5bd933..ee296e71 100644 --- a/components/WeaponGrid/index.tsx +++ b/components/WeaponGrid/index.tsx @@ -86,12 +86,12 @@ const WeaponGrid = (props: Props) => { if (props.pushHistory) props.pushHistory(`/p/${party.shortcode}`) saveWeapon(party.id, weapon, position).then((response) => - storeGridWeapon(response.data.grid_weapon) + storeGridWeapon(response.data) ) }) } else { saveWeapon(party.id, weapon, position).then((response) => - storeGridWeapon(response.data.grid_weapon) + storeGridWeapon(response.data) ) } }