mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Fixed bugs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Search from '@/components/search/search';
|
||||
import SearchResult from '@/components/search/search-result';
|
||||
import Text from '@/components/ui/text/text';
|
||||
import { categoryQuery } from '@/lib/sanity/queries';
|
||||
import { clientFetch } from '@/lib/sanity/sanity.client';
|
||||
import { Metadata } from 'next';
|
||||
@@ -36,7 +37,12 @@ export default async function ProductPage({ params }: CategoryPageParams) {
|
||||
|
||||
return (
|
||||
<div className="my-8 flex w-full flex-col px-4 lg:my-12 lg:px-8 2xl:px-16">
|
||||
<Search isCategory placeholder={title.toLowerCase()} title={title}>
|
||||
{title && (
|
||||
<Text className="mb-8 lg:mb-12" variant="pageHeading">
|
||||
{title}
|
||||
</Text>
|
||||
)}
|
||||
<Search isCategory placeholder={title.toLowerCase()}>
|
||||
<SearchResult />
|
||||
</Search>
|
||||
</div>
|
||||
|
@@ -62,17 +62,7 @@ export default async function ProductPage({ params }: ProductPageParams) {
|
||||
'@type': 'Product',
|
||||
name: product.name,
|
||||
description: product.description,
|
||||
// @TODO UPDATE TO STORM URL???
|
||||
image: product.images[0].asset.url
|
||||
// offers: {
|
||||
// '@type': 'AggregateOffer',
|
||||
// availability: product.availableForSale
|
||||
// ? 'https://schema.org/InStock'
|
||||
// : 'https://schema.org/OutOfStock',
|
||||
// priceCurrency: product.priceRange.minVariantPrice.currencyCode,
|
||||
// highPrice: product.priceRange.maxVariantPrice.amount,
|
||||
// lowPrice: product.priceRange.minVariantPrice.amount
|
||||
// }
|
||||
};
|
||||
|
||||
return (
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
import Search from '@/components/search/search';
|
||||
import SearchResult from '@/components/search/search-result';
|
||||
import Text from '@/components/ui/text/text';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function SearchPage() {
|
||||
@@ -9,7 +10,11 @@ export default function SearchPage() {
|
||||
|
||||
return (
|
||||
<div className="my-8 flex w-full flex-col px-4 lg:my-12 lg:px-8 2xl:px-16">
|
||||
<Search title={t('search')}>
|
||||
<Text className="mb-8 lg:mb-12" variant="pageHeading">
|
||||
{t('search')}
|
||||
</Text>
|
||||
|
||||
<Search>
|
||||
<SearchResult />
|
||||
</Search>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user