Skip to content

Commit 6e250b2

Browse files
committed
Fix toc on Learn
1 parent 73ab9f8 commit 6e250b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/toc-hero/toc-hero-contents.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ export function TocHeroContents({
2626
<ul
2727
className={clsx(
2828
"grid grid-flow-row-dense grid-rows-2 gap-px border-t border-inherit bg-neu-300 dark:bg-neu-100",
29-
sections.length > 3
29+
sections.length % 3 === 0
3030
? "grid-cols-2 lg:grid-cols-[repeat(3,1fr)]"
31-
: "grid-cols-1",
31+
: sections.length % 2 === 0
32+
? "grid-cols-2"
33+
: "grid-cols-1",
3234
)}
3335
>
3436
{sections.map((section, i) => {

0 commit comments

Comments
 (0)