import React from 'react'; import PropTypes from 'prop-types'; import { pathUtils } from 'growi-commons'; import SearchTypeahead from './SearchTypeahead'; const PagePathAutoComplete = (props) => { const { addTrailingSlash, onClickSubmit, onInputChange, initializedPath, } = props; function getKeywordOnInit(path) { return addTrailingSlash ? pathUtils.addTrailingSlash(path) : pathUtils.removeTrailingSlash(path); } return ( ); }; PagePathAutoComplete.propTypes = { crowi: PropTypes.object.isRequired, initializedPath: PropTypes.string, addTrailingSlash: PropTypes.bool, onClickSubmit: PropTypes.func.isRequired, onInputChange: PropTypes.func.isRequired, }; PagePathAutoComplete.defaultProps = { initializedPath: '/', }; export default PagePathAutoComplete;