Fix search engine adding wildcard *

This commit is contained in:
Daniele Pancottini 2023-04-25 19:41:37 +02:00
parent 55bc53aa20
commit 2a99e3a129
3 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,7 @@ export const getSearchVariables = ({
let query = '' let query = ''
if (search) { if (search) {
query += `(product_type:${search}) OR (title:${search}) OR (tag:${search})` query += `(product_type:${search}) OR (title:*${search}*) OR (tag:${search})`
} }
if (brandId) { if (brandId) {

View File

@ -141,7 +141,7 @@ const Layout: React.FC<Props> = ({
} }
/> />
{/** Tidio Chat Script to implement Widget */} {/** 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> </div>
</CommerceProvider> </CommerceProvider>
) )

View File

@ -39,6 +39,7 @@ export async function getStaticProps({
config, config,
preview, preview,
}) })
const allProductsPromise = commerce.getAllProducts({ const allProductsPromise = commerce.getAllProducts({
variables: { first: 4 }, variables: { first: 4 },
config, config,
@ -56,6 +57,8 @@ export async function getStaticProps({
} }
} }
console.log(relatedProducts)
return { return {
props: { props: {
pages, pages,