Add blocking fallback to pages (#357)

* Update [...pages].tsx

* Fix provider config overwrite

* Shopify changes
This commit is contained in:
cond0r
2021-06-07 23:12:20 +03:00
committed by GitHub
parent 0e804d09f9
commit 2d0c6e0c8a
6 changed files with 18 additions and 12 deletions

View File

@@ -38,7 +38,9 @@ export default function getAllPagesOperation({
preview?: boolean
query?: string
} = {}): Promise<T['data']> {
const { fetch, locale, locales = ['en-US'] } = commerce.getConfig(config)
const { fetch, locale, locales = ['en-US', 'es'] } = commerce.getConfig(
config
)
const { data } = await fetch<GetAllPagesQuery, GetAllPagesQueryVariables>(
query,

View File

@@ -39,7 +39,7 @@ export default function getPageOperation({
config?: Partial<ShopifyConfig>
preview?: boolean
}): Promise<T['data']> {
const { fetch, locale = 'en-US' } = commerce.getConfig(config)
const { fetch, locale } = commerce.getConfig(config)
const {
data: { node: page },