diff --git a/code/frontend/src/components/BoxWithHeader.js b/code/frontend/src/components/BoxWithHeader.js index 3bc1783..65460e7 100644 --- a/code/frontend/src/components/BoxWithHeader.js +++ b/code/frontend/src/components/BoxWithHeader.js @@ -18,7 +18,16 @@ export default function BoxWithHeader({ header, body, children, className, ...pr } } + if(header === undefined) { + header = {} + } + + if(body === undefined) { + body = {} + } + if(children) { + if(body.children) { throw new Error("If directly passing `children` to BoxWithHeader, body.children should not be set.") }