Skip to content

Commit 60c8564

Browse files
authored
fix: empty bullet item on PageGrid (#9346)
1 parent 6e9fd38 commit 60c8564

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/components/pageGrid.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ export function PageGrid({header}: Props) {
2828
<nav>
2929
{header && <h2>{header}</h2>}
3030
<ul>
31-
{parentNode.children.map(n => (
32-
<li key={n.path} style={{marginBottom: '1rem'}}>
33-
<h4 style={{marginBottom: 0}}>
34-
<Link href={'/' + n.path}>{n.frontmatter.title}</Link>
35-
</h4>
36-
{n.frontmatter.description ?? <p>{n.frontmatter.description}</p>}
37-
</li>
38-
))}
31+
{parentNode.children
32+
/* NOTE: temp fix while we figure out the reason why some nodes have empty front matter */
33+
.filter(c => c.frontmatter.title)
34+
.map(n => (
35+
<li key={n.path} style={{marginBottom: '1rem'}}>
36+
<h4 style={{marginBottom: 0}}>
37+
<Link href={'/' + n.path}>{n.frontmatter.title}</Link>
38+
</h4>
39+
{n.frontmatter.description && <p>{n.frontmatter.description}</p>}
40+
</li>
41+
))}
3942
</ul>
4043
</nav>
4144
);

0 commit comments

Comments
 (0)