From 9eb1c1d1eee4286b6e7a124d3f5a32b3af453be0 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 28 Mar 2021 19:05:38 +0200 Subject: dynamic post routes --- components/chapters.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'components') diff --git a/components/chapters.tsx b/components/chapters.tsx index 27116ee..9c6fa95 100644 --- a/components/chapters.tsx +++ b/components/chapters.tsx @@ -5,7 +5,7 @@ import { NavbarItem } from '../components/navbar'; import RemoveRoundedIcon from '@material-ui/icons/RemoveRounded'; import KeyboardArrowDownRoundedIcon from '@material-ui/icons/KeyboardArrowDownRounded'; -interface chapter { +export interface chapter { name: string; sectionLink?: string; children?: Array; @@ -39,6 +39,7 @@ function NavbarChapter(props: { classList={classes} title={props.chapter.name} onIconClick={() => props.chapter.children?.length > 0 && setCollapsed(!collapsed)} + key={(() => Math.round(Math.random() * 1e12))()} style={{ marginLeft: 12 * props.level, }} outerStyle={outercss}> -- cgit v1.2.3