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