mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
Flatten fetcher responses
This commit is contained in:
@@ -63,9 +63,10 @@ export default function getProductOperation({
|
||||
const config = commerce.getConfig(userConfig)
|
||||
const { fetch: apiFetch } = config // TODO: Send config.locale to Spree.
|
||||
|
||||
const {
|
||||
data: { data: spreeSuccessResponse },
|
||||
} = await apiFetch<{ data: IProduct }, SpreeSdkVariables>('__UNUSED__', {
|
||||
const { data: spreeSuccessResponse } = await apiFetch<
|
||||
IProduct,
|
||||
SpreeSdkVariables
|
||||
>('__UNUSED__', {
|
||||
variables,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user