Improved Categories

This commit is contained in:
Bel Curcio 2021-05-28 17:58:07 -03:00
parent b69ab9fcfc
commit b47021c4a0
2 changed files with 4 additions and 5 deletions

View File

@ -75,7 +75,7 @@ export default function Search({
const { data } = useSearch({ const { data } = useSearch({
search: typeof q === 'string' ? q : '', search: typeof q === 'string' ? q : '',
categoryId: activeCategory?.entityId, categoryId: activeCategory?.id,
brandId: (activeBrand as any)?.entityId, brandId: (activeBrand as any)?.entityId,
sort: typeof sort === 'string' ? sort : '', sort: typeof sort === 'string' ? sort : '',
}) })
@ -164,8 +164,7 @@ export default function Search({
className={cn( className={cn(
'block text-sm leading-5 text-gray-700 hover:bg-gray-100 lg:hover:bg-transparent hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900', 'block text-sm leading-5 text-gray-700 hover:bg-gray-100 lg:hover:bg-transparent hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900',
{ {
underline: underline: activeCategory?.id === cat.id,
activeCategory?.entityId === cat.entityId,
} }
)} )}
> >

View File

@ -22,8 +22,8 @@
"@components/*": ["components/*"], "@components/*": ["components/*"],
"@commerce": ["framework/commerce"], "@commerce": ["framework/commerce"],
"@commerce/*": ["framework/commerce/*"], "@commerce/*": ["framework/commerce/*"],
"@framework": ["framework/bigcommerce"], "@framework": ["framework/vendure"],
"@framework/*": ["framework/bigcommerce/*"] "@framework/*": ["framework/vendure/*"]
} }
}, },
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"], "include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],