4
0
forked from crowetic/commerce

Added a comment

This commit is contained in:
Luis Alvarez 2020-10-29 19:25:19 -05:00
parent c70a965c7d
commit b06dca4243
2 changed files with 6 additions and 2 deletions

View File

@ -1,8 +1,12 @@
/**
* The utils here are used to help developers use the example
*/
export function missingLocaleInPages(): [string[], () => void] {
const invalidPaths: string[] = []
const log = () => {
if (invalidPaths.length) {
const single = invalidPaths.length === 0
const single = invalidPaths.length === 1
const pages = single ? 'page' : 'pages'
console.log(

View File

@ -7,8 +7,8 @@ import { getConfig } from '@bigcommerce/storefront-data-hooks/api'
import getPage from '@bigcommerce/storefront-data-hooks/api/operations/get-page'
import getAllPages from '@bigcommerce/storefront-data-hooks/api/operations/get-all-pages'
import getSlug from '@lib/get-slug'
import { Layout, HTMLContent } from '@components/core'
import { missingLocaleInPages } from '@lib/usage-warns'
import { Layout, HTMLContent } from '@components/core'
export async function getStaticProps({
preview,