refactor: use string replace

This commit is contained in:
Greg Richardson committed 2023-06-22 12:01:34 -06:00
1 parent e211968f35
commit ec0c6890fd
1 file changed
+1 -4
@@ -60,10 +60,7 @@ const RefSectionHandler = (props: RefSectionHandlerProps) => {
const pageTitle = getPageTitle()
const section = props.sections.find((section) => section.slug === slug)
const fullTitle = `${pageTitle}${section ? ` - ${section.title}` : ''}`
const path = router.asPath
.split('/')
.filter((segment) => segment !== 'crawlers')
.join('/')
const path = router.asPath.replace('/crawlers', '')
return (
<>