/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, {type ReactNode} from 'react'; import Link from '@docusaurus/Link'; import type {Props} from '@theme/TOCItems/Tree'; // Recursive component rendering the toc tree function TOCItemTree({ toc, className, linkClassName, isChild, }: Props): ReactNode { if (!toc.length) { return null; } return (