rename folder

This commit is contained in:
Loui Nissen-Petersen
2021-07-16 16:58:03 +02:00
parent 166bb037e4
commit 03dcf96fb1
529 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { getSortVariables } from './get-sort-variables'
import type { SearchProductsInput } from '../product/use-search'
export const getSearchVariables = ({ brandId, search, categoryId, sort }: SearchProductsInput) => {
const sortBy = {
field: 'NAME',
direction: 'ASC',
...getSortVariables(sort, !!categoryId),
channel: 'default-channel',
}
return {
categoryId,
filter: { search },
sortBy,
}
}
export default getSearchVariables