Add configuration to show product options when there's one variant available

This commit is contained in:
tniezg
2021-07-29 13:02:57 +02:00
parent 2c4e2e4cb4
commit 744a8b998e
13 changed files with 167 additions and 74 deletions

View File

@@ -40,9 +40,9 @@ export const handler: SWRHook<SearchProductsHook> = {
const sort = input.sort ? { sort: nextToSpreeSortMap[input.sort] } : {}
const { data: spreeSuccessResponse } = await fetch<
GraphQLFetcherResult<IProducts>
>({
const {
data: { data: spreeSuccessResponse },
} = await fetch<GraphQLFetcherResult<{ data: IProducts }>>({
variables: {
methodPath: 'products.list',
arguments: [