From a2212a40b7f059defb60cb02144293607764e5de Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Thu, 7 Jul 2022 10:39:45 -0500 Subject: [PATCH] Made descriptions on buyables optional --- src/features/buyable.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/buyable.tsx b/src/features/buyable.tsx index de60c83..c2f9972 100644 --- a/src/features/buyable.tsx +++ b/src/features/buyable.tsx @@ -24,7 +24,7 @@ export type BuyableDisplay = | CoercableComponent | { title?: CoercableComponent; - description: CoercableComponent; + description?: CoercableComponent; effectDisplay?: CoercableComponent; showAmount?: boolean; }; @@ -169,7 +169,7 @@ export function createBuyable( if (currDisplay != null && buyable.cost != null && buyable.resource != null) { const genericBuyable = buyable as GenericBuyable; const Title = coerceComponent(currDisplay.title || "", "h3"); - const Description = coerceComponent(currDisplay.description); + const Description = coerceComponent(currDisplay.description || ""); const EffectDisplay = coerceComponent(currDisplay.effectDisplay || ""); return ( @@ -179,7 +179,7 @@ export function createBuyable( </div> ) : null} - <Description /> + {currDisplay.description ? <Description /> : null} {currDisplay.showAmount === false ? null : ( <div> <br />