From cefa859f4ae88aca2f0af713f1dccd2ba3fb61f5 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 29 Jan 2023 22:19:07 -0800 Subject: [PATCH] Rearrange so that hovercard clicks dont trigger search --- components/CharacterUnit/index.tsx | 24 ++++++++++++------------ components/SummonUnit/index.tsx | 21 +++++++++------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/components/CharacterUnit/index.tsx b/components/CharacterUnit/index.tsx index e70061f1..f2d115b7 100644 --- a/components/CharacterUnit/index.tsx +++ b/components/CharacterUnit/index.tsx @@ -295,18 +295,7 @@ const CharacterUnit = ({ /> ) - if (gridCharacter) { - image = ( - - {image} - - ) - } - - return ( + const content = (
) + + return gridCharacter ? ( + + {content} + + ) : ( + content + ) } const unitContent = ( diff --git a/components/SummonUnit/index.tsx b/components/SummonUnit/index.tsx index 3ee7447f..7f939085 100644 --- a/components/SummonUnit/index.tsx +++ b/components/SummonUnit/index.tsx @@ -235,18 +235,7 @@ const SummonUnit = ({ /> ) - if (gridSummon) { - image = ( - - {image} - - ) - } - - return ( + const content = (
{image} {editable ? ( @@ -258,6 +247,14 @@ const SummonUnit = ({ )}
) + + return gridSummon ? ( + + {content} + + ) : ( + content + ) } const unitContent = (