Skip to content

Commit

Permalink
reorder attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
joergreichert committed Jun 30, 2024
1 parent 8f679fc commit b5f2789
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions src/components/Sidebar/SidebarTree/TreeInfos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,38 @@ const TreeInfos: FC<{
<InfoValue>{gattung}</InfoValue>
</InfoContainer>
)}
{standortnr && (
<InfoContainer>
<span>Standortnummer</span>
<InfoValue>{standortnr}</InfoValue>
</InfoContainer>
)}
{treeAge === undefined && (
<>
<InfoContainer>
<span>Standalter</span>
<InfoValue>unbekannt</InfoValue>
</InfoContainer>
</>
)}
{typeof treeAge === 'number' && (
<InfoContainer>
<span>Standalter</span>
<InfoValue>{treeAge == 0 ? "jünger als " : ""} {treeAge == 0 ? 1 : treeAge} Jahr{treeAge > 1 ? "e" : ""}</InfoValue>
</InfoContainer>
)}
{typeof treeAge === 'number' && (
<ExpandablePanel
title={
<>
<span style={{ marginRight: 8 }}>Wasserbedarf:</span>
<WaterDrops dropsAmount={getWaterNeedByAge(treeAge)} />
</>
}
>
<WaterNeedsInfo />
</ExpandablePanel>
)}
{baumhoehe && (
<InfoContainer>
<span>Höhe</span>
Expand All @@ -362,38 +394,6 @@ const TreeInfos: FC<{
<InfoValue>{formatNumber(kronedurch)} m</InfoValue>
</InfoContainer>
)}
{standortnr && (
<InfoContainer>
<span>Standortnummer</span>
<InfoValue>{standortnr}</InfoValue>
</InfoContainer>
)}
{treeAge === undefined && (
<>
<InfoContainer>
<span>Standalter</span>
<InfoValue>unbekannt</InfoValue>
</InfoContainer>
</>
)}
{typeof treeAge === 'number' && (
<>
<InfoContainer>
<span>Standalter</span>
<InfoValue>{treeAge == 0 ? "jünger als " : ""} {treeAge == 0 ? 1 : treeAge} Jahr{treeAge > 1 ? "e" : ""}</InfoValue>
</InfoContainer>
<ExpandablePanel
title={
<>
<span style={{ marginRight: 8 }}>Wasserbedarf:</span>
<WaterDrops dropsAmount={getWaterNeedByAge(treeAge)} />
</>
}
>
<WaterNeedsInfo />
</ExpandablePanel>
</>
)}
{ notes && (
<ExpandablePanel
title={
Expand Down

0 comments on commit b5f2789

Please sign in to comment.