import Search from '@hashicorp/react-search' export default function SearchBar() { return ( ( <> )} resolveHitLink={(hit) => ({ href: { pathname: `/${transformIdtoUrl(hit.objectID)}`, }, })} placeholder="Search Packer documentation" /> ) } function transformIdtoUrl(id) { return id.replace(/\/index$/, '') }