We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f38b14 commit 4e45fabCopy full SHA for 4e45fab
app/sidebar.tsx
@@ -48,12 +48,8 @@ export function Sidebar() {
48
<ul className="ml-4 mt-2 text-sm">
49
{splitmdcontent
50
.slice(1)
51
- .map((section, idx) => ( section.level===2 ?
52
- <li key={idx}>
53
- <Link href={`#${idx+1}`}>{section.title}</Link>
54
- </li>
55
- :
56
- <li key={idx} style={{ marginLeft: '1em' }}>
+ .map((section, idx) => (
+ <li key={idx} style={{ marginLeft: section.level===2 ? undefined : "1em" }}>
57
<Link href={`#${idx+1}`}>{section.title}</Link>
58
</li>
59
))}
0 commit comments