{"size": 532, "ext": "js", "max_stars_repo_path": "packages/website/components/mdx/arch-switch.js", "max_stars_repo_name": "nftstorage/nft.storage", "max_stars_repo_stars_event_min_datetime": "2021-10-30T10:58:03.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T04:53:28.000Z", "max_issues_repo_path": "packages/website/components/mdx/arch-switch.js", "max_issues_repo_name": "nftstorage/nft.storage", "max_issues_repo_issues_event_min_datetime": "2021-10-29T21:07:36.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T18:40:43.000Z", "max_forks_repo_path": "packages/website/components/mdx/arch-switch.js", "max_forks_repo_name": "nftstorage/nft.storage", "max_forks_repo_forks_event_min_datetime": "2021-11-01T10:47:30.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-27T01:00:00.000Z"}
{"max_stars_count": 161, "max_issues_count": 1039, "max_forks_count": 53, "avg_line_length": 21.28, "max_line_length": 80, "alphanum_fraction": 0.4906015038}
import React from 'react'
import { osName } from 'react-device-detect'

/**
 * @param {any} props
 */
export function ArchSwitch({ children }) {
  return (
    <div className="arch-container mt-6">
      {children.length &&
        children.map((/** @type {{ props: { case: string; }; }} */ element) => {
          if (
            !element.props ||
            !element.props.case ||
            element.props.case === osName
          ) {
            return element
          }

          return null
        })}
    </div>
  )
}
