mirror of
https://github.com/vercel/commerce.git
synced 2025-05-16 06:26:58 +00:00
Fix search engine adding wildcard *
This commit is contained in:
parent
55bc53aa20
commit
2a99e3a129
@ -11,7 +11,7 @@ export const getSearchVariables = ({
|
||||
let query = ''
|
||||
|
||||
if (search) {
|
||||
query += `(product_type:${search}) OR (title:${search}) OR (tag:${search})`
|
||||
query += `(product_type:${search}) OR (title:*${search}*) OR (tag:${search})`
|
||||
}
|
||||
|
||||
if (brandId) {
|
||||
|
@ -141,7 +141,7 @@ const Layout: React.FC<Props> = ({
|
||||
}
|
||||
/>
|
||||
{/** Tidio Chat Script to implement Widget */}
|
||||
<Script src='//code.tidio.co/nx3mte5iva2dotyph2gt4k2dqei2uwbj.js' async id="show-banner" strategy="lazyOnload"></Script>
|
||||
<Script src="//code.tidio.co/mqhzygds3ad04ma8od6ud9ov11fpy4md.js" id="show-banner" strategy="lazyOnload"></Script>
|
||||
</div>
|
||||
</CommerceProvider>
|
||||
)
|
||||
|
@ -39,6 +39,7 @@ export async function getStaticProps({
|
||||
config,
|
||||
preview,
|
||||
})
|
||||
|
||||
const allProductsPromise = commerce.getAllProducts({
|
||||
variables: { first: 4 },
|
||||
config,
|
||||
@ -56,6 +57,8 @@ export async function getStaticProps({
|
||||
}
|
||||
}
|
||||
|
||||
console.log(relatedProducts)
|
||||
|
||||
return {
|
||||
props: {
|
||||
pages,
|
||||
|
Loading…
x
Reference in New Issue
Block a user