mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
Show placeholder message for /chechout and adjust api fetcher type
This commit is contained in:
@@ -57,7 +57,9 @@ export default function getAllProductsOperation({
|
||||
|
||||
const {
|
||||
data: { data: spreeSuccessResponse },
|
||||
} = await apiFetch<{ data: IProducts }>('__UNUSED__', { variables })
|
||||
} = await apiFetch<{ data: IProducts }, SpreeSdkVariables>('__UNUSED__', {
|
||||
variables,
|
||||
})
|
||||
|
||||
const normalizedProducts: Product[] = spreeSuccessResponse.data.map(
|
||||
(spreeProduct) => normalizeProduct(spreeSuccessResponse, spreeProduct)
|
||||
|
@@ -63,7 +63,9 @@ export default function getProductOperation({
|
||||
|
||||
const {
|
||||
data: { data: spreeSuccessResponse },
|
||||
} = await apiFetch<{ data: IProduct }>('__UNUSED__', { variables })
|
||||
} = await apiFetch<{ data: IProduct }, SpreeSdkVariables>('__UNUSED__', {
|
||||
variables,
|
||||
})
|
||||
|
||||
return {
|
||||
product: normalizeProduct(
|
||||
|
@@ -86,9 +86,12 @@ export default function getSiteInfoOperation({
|
||||
|
||||
const {
|
||||
data: { data: spreeCategoriesSuccessResponse },
|
||||
} = await apiFetch<{
|
||||
data: ITaxons
|
||||
}>('__UNUSED__', {
|
||||
} = await apiFetch<
|
||||
{
|
||||
data: ITaxons
|
||||
},
|
||||
SpreeSdkVariables
|
||||
>('__UNUSED__', {
|
||||
variables: createVariables(
|
||||
requireConfigValue('spreeCategoriesTaxonomyId') as string
|
||||
),
|
||||
@@ -96,9 +99,12 @@ export default function getSiteInfoOperation({
|
||||
|
||||
const {
|
||||
data: { data: spreeBrandsSuccessResponse },
|
||||
} = await apiFetch<{
|
||||
data: ITaxons
|
||||
}>('__UNUSED__', {
|
||||
} = await apiFetch<
|
||||
{
|
||||
data: ITaxons
|
||||
},
|
||||
SpreeSdkVariables
|
||||
>('__UNUSED__', {
|
||||
variables: createVariables(
|
||||
requireConfigValue('spreeBrandsTaxonomyId') as string
|
||||
),
|
||||
|
Reference in New Issue
Block a user