aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-03-28 19:05:38 +0200
committerlonkaars <l.leblansch@gmail.com>2021-03-28 19:05:38 +0200
commit9eb1c1d1eee4286b6e7a124d3f5a32b3af453be0 (patch)
tree187dab2d295ed29e9f4e2505d8d6e05179094ab9 /components
parent8b79c4b8892ee981246e4cf40f30cc09a4e0e822 (diff)
dynamic post routes
Diffstat (limited to 'components')
-rw-r--r--components/chapters.tsx3
1 files changed, 2 insertions, 1 deletions
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<chapter>;
@@ -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}>