We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 737d8e2 commit ff52287Copy full SHA for ff52287
src/components/SearchUI/index.tsx
@@ -73,7 +73,7 @@ const Search = ({
73
74
const handleChange = (hit: Hit) => {
75
if (!hit) return
76
- navigate(`/${hit.slug}`, { state: { newWindow: true } })
+ navigate(`${hit.fields?.slug || `/${hit.slug}`}`, { state: { newWindow: true } })
77
onChange?.()
78
}
79
@@ -160,7 +160,7 @@ const Search = ({
160
>
161
<div className="py-2 px-4 block">
162
<p className="text-[13px] text-red dark:text-yellow font-medium m-0">
163
- /{hit.fields?.slug || hit.slug}
+ {hit.fields?.slug || `/${hit.slug}`}
164
</p>
165
<h5 className="text-[15px] m-0 font-bold line-clamp-1">
166
{hit.title}
0 commit comments