Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import PropTypes from 'prop-types';
import Dropdown from '@jetbrains/ring-ui/components/dropdown/dropdown';
import PopupMenu from '@jetbrains/ring-ui/components/popup-menu/popup-menu';
import branches from '../branches.json';
import {currentPath} from './utils';
import styles from './index.css';
const HOST = 'https://jetbrains.github.io/ring-ui';
const rgItemType = PopupMenu.ListProps.Type.LINK;
const branchesArr = Object.keys(branches).map(version => ({
version,
path: branches[version],
// /^0\.1\.\d+$/
versionRE: new RegExp(`^${version.replace(/\./g, '\\.').replace(/\*/g, '\\d+')}$`)
}));
const Version = ({version}) => (
{
const active = branch.versionRE.test(version);