Add conditional rendering to token status and label
This commit is contained in:
parent
78dac55d7a
commit
e352cadaea
@ -248,16 +248,20 @@ function MapToken({
|
|||||||
hitFunc={() => {}}
|
hitFunc={() => {}}
|
||||||
/>
|
/>
|
||||||
<Group offsetX={tokenWidth / 2} offsetY={tokenHeight / 2}>
|
<Group offsetX={tokenWidth / 2} offsetY={tokenHeight / 2}>
|
||||||
|
{tokenState.statuses?.length > 0 ? (
|
||||||
<TokenStatus
|
<TokenStatus
|
||||||
tokenState={tokenState}
|
tokenState={tokenState}
|
||||||
width={tokenWidth}
|
width={tokenWidth}
|
||||||
height={tokenHeight}
|
height={tokenHeight}
|
||||||
/>
|
/>
|
||||||
|
) : null}
|
||||||
|
{tokenState.label ? (
|
||||||
<TokenLabel
|
<TokenLabel
|
||||||
tokenState={tokenState}
|
tokenState={tokenState}
|
||||||
width={tokenWidth}
|
width={tokenWidth}
|
||||||
height={tokenHeight}
|
height={tokenHeight}
|
||||||
/>
|
/>
|
||||||
|
) : null}
|
||||||
</Group>
|
</Group>
|
||||||
</animated.Group>
|
</animated.Group>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user