Skip to content

Commit 861ca33

Browse files
committed
feat: in react ui, adjust visibility of Timeline and Topology based on SML selection
Signed-off-by: Nick Mitchell <[email protected]>
1 parent b603db9 commit 861ca33

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pdl-live-react/src/view/masonry/Masonry.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ export default function Masonry({ as, sml, model, children }: Props) {
2020
return (
2121
<ResponsiveMasonry columnsCountBreakPoints={breakpoints}>
2222
<MasonryView className="pdl-masonry-view">
23-
{(!children ? [] : Array.isArray(children) ? children : [children]).map(
24-
(child, idx) => (
23+
{(!children ? [] : Array.isArray(children) ? children : [children])
24+
.filter(Boolean)
25+
.map((child, idx) => (
2526
<div key={idx} className="pdl-masonry-tile" data-padding={sml}>
2627
{child}
2728
</div>
28-
),
29-
)}
29+
))}
3030
{model.map((props, idx) => (
3131
<MasonryTile
3232
key={props.id}

pdl-live-react/src/view/masonry/MasonryCombo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export default function MasonryCombo({ value }: Props) {
6565
aria-label="PDL Viewer main section"
6666
>
6767
<Masonry model={masonry} as={as} sml={sml}>
68-
<Timeline model={base} numbering={numbering} />
69-
<Memory block={block} numbering={numbering} />
68+
{sml !== "s" && <Timeline model={base} numbering={numbering} />}
69+
{sml === "l" && <Memory block={block} numbering={numbering} />}
7070
</Masonry>
7171
</PageSection>
7272

0 commit comments

Comments
 (0)