diff --git a/components/Tabs.js b/components/Tabs.js index 56a44478..a6a9b1d9 100644 --- a/components/Tabs.js +++ b/components/Tabs.js @@ -10,13 +10,19 @@ const Tabs = ({ className, children }) => { return <> } - let count = children.length + children = children.filter(c => c !== '') + + let count = 0 children.forEach(e => { - if (!e) { - count-- + if (e) { + count++ } }) + if (count === 0) { + return <> + } + if (count === 1) { return
{children}