import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { navigate } from 'gatsby'

import classes from '../styles/dropdown.module.sass'

export default function Dropdown({ defaultValue, className, onChange, children }) {
    const defaultOnChange = ({ target }) => navigate(target.value)
    return (
        <select
            defaultValue={defaultValue}
            className={classNames(classes.root, className)}
            onChange={onChange || defaultOnChange}
        >
            {children}
        </select>
    )
}

Dropdown.propTypes = {
    defaultValue: PropTypes.string,
    className: PropTypes.string,
    onChange: PropTypes.func,
    children: PropTypes.node.isRequired,
}

@@ -306,16 +306,197 @@
 et %7D) =%3E
+ %7B%0A        const isExternal = /((http(s?)):%5C/%5C/%7Cmailto:)/gi.test(target.value)%0A        if (isExternal) %7B%0A            window.location.href = target.value%0A        %7D else %7B%0A           
  navigat
@@ -507,24 +507,40 @@
 rget.value)%0A
+        %7D%0A    %7D%0A
     return (

Fix dropdown [ci skip]