From 75a3e26cce8ec66cdc88d125e2d64dbd74f18c65 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 9 Feb 2025 18:46:29 -0800 Subject: [PATCH] Update handling for over mastery and awakening - Rings are now arrays, not objects - Awakenings lookup based on slug, not id - Use 0-index for rings, not 1-index - Add appropriate optional operators - Add temporary lookup table for character awakenings --- .../character/CharacterHovercard/index.tsx | 17 ++- components/character/CharacterModal/index.tsx | 106 ++++++++++-------- components/character/CharacterUnit/index.tsx | 12 +- .../AwakeningSelectWithInput/index.tsx | 56 +++++---- components/party/Party/index.tsx | 14 +-- components/weapon/WeaponModal/index.tsx | 7 +- 6 files changed, 107 insertions(+), 105 deletions(-) diff --git a/components/character/CharacterHovercard/index.tsx b/components/character/CharacterHovercard/index.tsx index 3c01c0d3..1a9e6d55 100644 --- a/components/character/CharacterHovercard/index.tsx +++ b/components/character/CharacterHovercard/index.tsx @@ -65,7 +65,7 @@ const CharacterHovercard = (props: Props) => { } const overMasterySection = () => { - if (props.gridCharacter && props.gridCharacter.over_mastery) { + if (props.gridCharacter && props.gridCharacter.over_mastery.length > 0) { return (
@@ -73,14 +73,13 @@ const CharacterHovercard = (props: Props) => {