Made descriptions on buyables optional
This commit is contained in:
parent
0def9ca5a6
commit
a2212a40b7
1 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ export type BuyableDisplay =
|
||||||
| CoercableComponent
|
| CoercableComponent
|
||||||
| {
|
| {
|
||||||
title?: CoercableComponent;
|
title?: CoercableComponent;
|
||||||
description: CoercableComponent;
|
description?: CoercableComponent;
|
||||||
effectDisplay?: CoercableComponent;
|
effectDisplay?: CoercableComponent;
|
||||||
showAmount?: boolean;
|
showAmount?: boolean;
|
||||||
};
|
};
|
||||||
|
@ -169,7 +169,7 @@ export function createBuyable<T extends BuyableOptions>(
|
||||||
if (currDisplay != null && buyable.cost != null && buyable.resource != null) {
|
if (currDisplay != null && buyable.cost != null && buyable.resource != null) {
|
||||||
const genericBuyable = buyable as GenericBuyable;
|
const genericBuyable = buyable as GenericBuyable;
|
||||||
const Title = coerceComponent(currDisplay.title || "", "h3");
|
const Title = coerceComponent(currDisplay.title || "", "h3");
|
||||||
const Description = coerceComponent(currDisplay.description);
|
const Description = coerceComponent(currDisplay.description || "");
|
||||||
const EffectDisplay = coerceComponent(currDisplay.effectDisplay || "");
|
const EffectDisplay = coerceComponent(currDisplay.effectDisplay || "");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -179,7 +179,7 @@ export function createBuyable<T extends BuyableOptions>(
|
||||||
<Title />
|
<Title />
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
<Description />
|
{currDisplay.description ? <Description /> : null}
|
||||||
{currDisplay.showAmount === false ? null : (
|
{currDisplay.showAmount === false ? null : (
|
||||||
<div>
|
<div>
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Reference in a new issue