mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Fixed bugs
This commit is contained in:
@@ -40,7 +40,7 @@ export default function SearchResult() {
|
||||
classNames={{
|
||||
root: cn('flex flex-col flex-1'),
|
||||
list: cn(
|
||||
'grid grid-cols-2 mt-4 gap-4 md:grid-cols-3 md:gap-8 lg:grid-cols-4 lg:gap-12 lg:mt-12'
|
||||
'grid grid-cols-2 mt-4 gap-4 md:grid-cols-3 md:mt-8 lg:grid-cols-4 lg:gap-8 lg:mt-12 2xl:gap-12'
|
||||
),
|
||||
loadMore:
|
||||
'border border-ui-border mt-4 px-6 py-3 inline-flex mx-auto w-auto disabled:opacity-50 disabled:cursor-not-allowed md:mt-8 lg:mt-12'
|
||||
|
@@ -1,7 +1,5 @@
|
||||
'use client';
|
||||
|
||||
import Text from '@/components/ui/text';
|
||||
|
||||
import { cn } from 'lib/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import SearchRoot from './search-root';
|
||||
@@ -12,28 +10,19 @@ import { ReactNode } from 'react';
|
||||
import { NoResults, NoResultsBoundary } from './no-result';
|
||||
|
||||
interface SearchProps {
|
||||
title?: string;
|
||||
placeholder?: string;
|
||||
className?: string;
|
||||
children: ReactNode;
|
||||
isCategory?: boolean;
|
||||
}
|
||||
|
||||
export default function Search({ title, placeholder, children, isCategory = false }: SearchProps) {
|
||||
export default function Search({ placeholder, children, isCategory = false }: SearchProps) {
|
||||
const t = useTranslations('search');
|
||||
|
||||
console.log(isCategory);
|
||||
|
||||
return (
|
||||
<SearchRoot>
|
||||
{/* Search top */}
|
||||
<div className="">
|
||||
{title && (
|
||||
<Text className="mb-8 lg:mb-12" variant="pageHeading">
|
||||
{title}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
<SearchBox
|
||||
placeholder={
|
||||
placeholder
|
||||
|
Reference in New Issue
Block a user