refactor: Conditionally render distance display for aisles and reference aisles based on toggleView state
This commit is contained in:
parent
b26ebcc4cc
commit
865bb9f2d3
|
@ -47,7 +47,10 @@ function AisleInstances() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
||||||
<AisleInstance aisle={aisle} key={aisle.uuid} />
|
<AisleInstance aisle={aisle} key={aisle.uuid} />
|
||||||
|
|
||||||
|
{toggleView &&
|
||||||
<Html
|
<Html
|
||||||
// data
|
// data
|
||||||
key={aisle.uuid}
|
key={aisle.uuid}
|
||||||
|
@ -68,6 +71,8 @@ function AisleInstances() {
|
||||||
{distance.toFixed(2)} m
|
{distance.toFixed(2)} m
|
||||||
</div>
|
</div>
|
||||||
</Html>
|
</Html>
|
||||||
|
}
|
||||||
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -178,6 +178,8 @@ function ReferenceAisle({ tempPoints }: Readonly<ReferenceAisleProps>) {
|
||||||
|
|
||||||
const rendertext = () => {
|
const rendertext = () => {
|
||||||
return (
|
return (
|
||||||
|
<>
|
||||||
|
{toggleView &&
|
||||||
<Html
|
<Html
|
||||||
// data
|
// data
|
||||||
key={tempAisle.uuid}
|
key={tempAisle.uuid}
|
||||||
|
@ -198,6 +200,8 @@ function ReferenceAisle({ tempPoints }: Readonly<ReferenceAisleProps>) {
|
||||||
{distance.toFixed(2)} m
|
{distance.toFixed(2)} m
|
||||||
</div>
|
</div>
|
||||||
</Html>
|
</Html>
|
||||||
|
}
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue